One#!/bin/bash#自动添加用户, and make the initial password a user account name, and force the user to change the password when they log onI=1While [$i-le 15]DoIf [$i-le 9]ThenUseradd user0$iecho "User0$i" | passwd--stdin user0$i &>/dev/nullchage-d 0 user0$
Break, continue, exit, return are generally used to control the direction of the loopStart with a script descriptionFor ((i=1;iDoIf [$i-eq 3]Then# break# continue# exitFiEcho $iDoneEcho OKResults of the outputResult of break12OkResults of continue124
Use! To invoke past commands.!! Repeat the previous instruction!a Repeat the previous instruction, led by a!nubmer Repeat the previous instruction to record numbers in the history table!-number Repeat the previous number instructionAilas abc= ' CD
One: Shell conceptThe word shell is unfamiliar, meaning "shell" is a layer of interaction between the OS core and the user, in a Linux system, the user can use the command terminal, the shell command down to convey their wishes,Drive kernel to
Original: You can also play Skype--get started with the development shell based on the Skype APISkype is by far the most powerful Im+voip software on the planet, and Skype has now changed the way 280 million people live in the world. You, deserve to
Not to mention, directly add the script.# Processbar processbar () {local current = $1; Local Total = $2; Local maxlen = 80; Local barlen = 66; Local perclen = 14; local format = "%-$ {barlen} s % $ (maxlen-barlen )) s "Local Perc =" [$ current/$
Shell script error: "[: =: unary operator expected"Md5_109a = "81ab961153b62d207f0f517048881b5d"Md5_1_ B = 'md5sum install. Bin | awk '{print $1 }''If [$ md5_109a! = $ Md5_1_ B]Cause: when the file install. Bin does not exist, $ md5_1_ B is empty so
HTC hero mobile phone players have become a habit and pleasure in trying to brush different ROM systems, but we can also try to brush the shell with different colors, you can change the color of your phone at will. Recently, a player on the modaco
1. Description
Tr-translate or delete characters
Tr [Option]... set1 [set2]
Translate, squeeze, and/or delete characters from standard input, writing to standard output. Sets are specified as strings of characters.
TR is used to convert
Original article link
Cutting-edge
In the past, I wanted to write a bash-like GUI interface, so I had to use the libncurses library in C. I thought it was annoying.
With the dialog tool, you canProgramInUse shell script to complete
1. Redirect related file descriptors
1) file descriptor
①0 standard input,/dev/stdin->/proc/self/FD/0
②1 standard output,/dev/stdout->/proc/self/FD/1
③2 standard error output,/dev/stderr->/proc/self/FD/2
2) redirection
①> Is 1>
②
③>
Shell scripts are similar to batch processing in Windows/DOS, that is, various commands are pre-placed into a file, and then the file can be executed to achieve similar features as batch processing, it is mainly used by administrators for setting or
Write in the afternoon
ProgramYou must assign the value returned by the shell command to a variable and use the = $ () method.
Soft = $ (grep-I "\ (Software \) token/passcode/." 123.txt | WC-l)
Echo "[+] Total number of soft cards:" $ soft
......
Recently, some tests were conducted in Erlang shell. In order to make the test result data more intuitive, we wanted to align the data to be printed and achieve the same effect as imaging tables.
The idea was to insert a tab in the data. Of course,
Server address: 192.168.1.110
Network Segment: 192.168.1.0
Subnet Mask: 255.255.255.0
Gateway: 192.168.1.254
[[Email protected] ~] # Cat DHCP. Sh#! /Bin/bash# Auto deploy DHCP server for 192.168.1.0/24 netmask# This script need you have you Yum
========================================================== ==========This article is the original khler, and the original author information and the original link of this article must be kept completely and completely reprinted.
Author:
When it comes to shell wildcard (wildcard), it is often used. The following is an example:
#1
[chengmo@localhost ~/shell]$ lsa.txt b.txt c.old#2
[chengmo@localhost ~/shell]$ ls *.txta.txt b.txt#3
[Chengmo @ localhost ~ /Shell] $ ls d *.
*-B returns true if the file exists and is a block file
*-C returns true if the file exists and is a character file
*-D returns true if pathname exists and is a directory
*-E returns true if the file or directory specified by pathname exists.
Binary comparison operator, which compares variables or numbers. Note the difference between numbers and strings.
Integer comparison
-Eq equals to, for example, if ["$ a"-eq "$ B"]-Ne is not equal to, for example, if ["$ a"-ne "$ B"]-Gt is greater
Why is the difference between windows dos and Linux shell ??, Linuxshell
Import the database using impdp in Windows dos:
Impdp "sys/password @ ip: 1521/sidname as sysdba" directory = dbdir dumpfile = "full. dmp" full = y
You can import a complete
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service