Simply put, the shell is a file containing several lines of shell or Linux commands. For a large number of commands that are written and used more than once, you can use a separate file to save it for later use. Usually the shell script is suffixed
[-A file] is true if file exists.[-B file] True if file exists and is a block special file.[-C file] True if file exists and is a word special.[-D file] True if file exists and is a directory.[-E File] True if file exists.[-F file] True if file
1. The SED editor uses the SED editor, called the Stream editor, to edit the data flow based on a set of rules provided beforehand. Format: SED option script file (1) OPTION-E script when processing the input, add the command specified in the script
Substitution of 1,shell variablesVariables can be replaced by a specific value depending on whether the variable is empty or deleted${var} variable Original value$ (Var:-word) If the variable is empty or has been deleted then return to Word, but do
The shell supports custom variables.Defining variablesWhen defining a variable, the variable name does not have a dollar sign ($), such as:Value= "TMP"Note that there can be no spaces between the variable name and the equals sign, which may be
if [$#! = 1]; Thenecho "USAGE: $ tabname"echo "e.g.: $ cdr_call_20040701"Exit 1;FiLocation parameters $ #代表了命令行的参数数量, $ $,..., $N, and $ A represents the name of the script-ne Not equal to-----------------------Used in shell programming to determine
This is due to the fact that the environment variable hasAllias cp= ' Cp-i 'In order to get rid of the alias of this system, can use Grep-r--include= "*" "Alias CP"/Find the script file setting this environment variable:On my Ubuntu machine
Transferred from: http://www.cnblogs.com/nexiyi/p/hbase_shell.htmlTwo months ago used HBase, now the most basic commands are forgotten, leave a reference ~
Enter HBase Shell Console$HBASE _home/bin/hbase ShellIf you have Kerberos
1. The first line must specify the shell used: #!/bin/bash/2, Print command: Echo-N: Suppress line breaks3. Use command line parameters:$#: The number of command-line arguments passed in the script$*: All command-line parameter values, with a space
${value:-word}If the variable name exists and is not NULL, the value of the variable is returned, otherwise the word string is returned.${value:=word}If the variable name exists and is not NULL, the value of the variable is returned, otherwise, the
variable test Statement-testFunction: Used to test whether the variable is equal, is empty, file type, and so on.Format:Test tested Condition or []#范围: Integer, String. File1) integer test :Test int1-eq int2 test integers are equalTest int1-ge int2
If usage:if []; thenCommandelif []; thenCommandElseCommandFiIf parameter:Used in shell programming to determine parameters within an if statement–b return True when file exists and is a block file-C Returns True when file exists and is a character-D
The color of the text terminal can be generated by using the ANSI unconventional character sequence. Example:Echo-e "\033[44;37;5m ME \033[0m COOL"The above command sets the background to blue, foreground white, blinking cursor, output character "ME"
StatsTo view the basic commands for the memcached status, this command allows you to see the following information:STAT PID 22459 Process IDSTAT uptime 1027046 server running secondsSTAT time 1273043062 Server current UNIX timestampSTAT version 1.4.4
1, case do with the execution of the option script:#!/bin/bashCase $ inXecho "X is selected";;*)echo "Please use X"EsacSecond, case combined while doing interactive script:#!/bin/bashWhile TrueDoRead-p "Enter Port of Chaoxingdata (d,1):" PortCase
This is the 6.828 first section of a small job, is to implement a shell, most of the source code is given, but compile a lot of bugs and warning found, so need to read the source and then change their own.The focus of this assignment is to
Create multiple user groups and users, set up candidate groups, default shellgroupadd-g 40000 adminuser specify GIDUseradd natasha-g adminuser Specify a subordinate group[Email protected]/]# Useradd Harry-gadminuser[Email protected]/]# Useradd sarah-
Shell Special variablesVariable meaning$ $ Gets the script name of the currently executing shell script, including the path and script name if the script has a path$n Gets the nth parameter in the currently executing shell script. But when n=1..9,
*http://kingj.iteye.com/blog/1420586, there wasJava.lang.IllegalThreadStateException:process have not exitedAt Java.lang.Win32Process.exitValue (Native Method)Exception, background 100 degree discovery, the JDK implementation process, call External
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