From 84d647d2823ddeb7dc11d159ab233c3dc0c86972 Mon Sep 17 00:00:00 2001 From: "Martin A. Brown" Date: Thu, 3 Mar 2016 13:30:50 -0800 Subject: [PATCH] move in for validation It is not valid to have elements directly as a child of a , so I have moved them inside the . I tried putting them inbetween elements (no good). --- LDP/guide/docbook/abs-guide/abs-guide.xml | 1651 +++++++++++---------- 1 file changed, 894 insertions(+), 757 deletions(-) diff --git a/LDP/guide/docbook/abs-guide/abs-guide.xml b/LDP/guide/docbook/abs-guide/abs-guide.xml index 98eaba63..375204f3 100644 --- a/LDP/guide/docbook/abs-guide/abs-guide.xml +++ b/LDP/guide/docbook/abs-guide/abs-guide.xml @@ -1090,17 +1090,19 @@ fi Scripts and Elsewhere # - - # - - - special character - # - - - comment - + + + # + + + special character + # + + + comment + + Comments Lines beginning with a # (with the exception of @@ -1167,18 +1169,19 @@ echo $(( 2#101011 )) # Base conversion, not a comment. ; - - ; - - - special character - ; - - - separator - - + + + ; + + + special character + ; + + + separator + + Command separator [semicolon] Permits putting two or more commands on the same line. @@ -1204,18 +1207,19 @@ fi; echo "File test complete." ;; - - ;; - - - special character - case - - - ;; - - + + + ;; + + + special character + case + + + ;; + + Terminator in a <link linkend="caseesac1">case</link> option [double semicolon] @@ -1233,22 +1237,23 @@ esac ;;& ;& - - ;;& - - - special character - ;;& - - - ;& - case statement - - - ;& - + + + ;;& + + + special character + ;;& + + + ;& + case statement + + + ;& + - <link + <formalpara><title><link linkend="ncterm">Terminators</link> in a <firstterm>case</firstterm> option (<link linkend="bash4ref">version 4+</link> of Bash). @@ -1260,21 +1265,22 @@ esac . - - . - - - special character - . - - - dot command - - - source - - + + + . + + + special character + . + + + dot command + + + source + + <quote>dot</quote> command [period] Equivalent to . - - . - - - special character - . - - - filename - - - part of a filename - - + + . + + + special character + . + + + filename + + + part of a filename + + <quote>dot</quote>, as a component of a filename When working with filenames, a leading dot is the prefix of a hidden file, a file that an @@ -1365,21 +1371,22 @@ esac . - - . - - - special character - . - - - character match - - - match single character - - + + + . + + + special character + . + + + character match + + + match single character + + <quote>dot</quote> character match When matching characters, as part of a : - - : - - - special character - : - - - null command - - - true - - - endless loop - - + + + : + + + special character + : + + + null command + + + true + + + endless loop + + null command [colon] This is the shell equivalent of a @@ -1680,26 +1688,26 @@ fi - - ! - - ! - - - special character - ! - - - not - logical - - - not - - + ! - reverse (or negate) the sense of - a test or exit status [bang] + + + ! + + + special character + ! + + + not + logical + + + not + + + reverse (or negate) the sense of + a test or exit status [bang] The ! operator inverts the exit status @@ -1729,22 +1737,24 @@ fi * - - * - - - special character - * - - - wild card - globbing - - - regular expression - + - wild card [asterisk] + + * + + + special character + * + + + wild card + globbing + + + regular expression + + + wild card [asterisk] The * character serves as a wild card for filename expansion in @@ -1769,22 +1779,24 @@ fi * - - * - - - special character - * - - - multiplication - exponentiation - - - arithmetic operator - + - <link linkend="arops1">arithmetic operator</link> + + * + + + special character + * + + + multiplication + exponentiation + + + arithmetic operator + + + <link linkend="arops1">arithmetic operator</link> In the context of arithmetic operations, the * denotes multiplication. @@ -1801,22 +1813,24 @@ fi ? - - ? - - - special character - ? - - - test - operator - - - test token - + - test operator + + ? + + + special character + ? + + + test + operator + + + test token + + + test operator Within certain expressions, the ? indicates a test for a condition. @@ -1858,22 +1872,24 @@ fi ? - - ? - - - special character - ? - - - wild card - globbing - - - regular expression - + - wild card + + ? + + + special character + ? + + + wild card + globbing + + + regular expression + + + wild card The ? character serves as a single-character wild card @@ -1889,17 +1905,19 @@ fi $ - - $ - - - special character - $ - - - variable substitution - + + + $ + + + special character + $ + + + variable substitution + + <link linkend="varsubn">Variable substitution</link> (contents of a variable) @@ -1920,21 +1938,22 @@ echo $var2 # 23skidoo $ - - $ - - - special character - $ - - - regular expression - - - end of line - - + + + $ + + + special character + $ + + + regular expression + + + end of line + + end-of-line In a regular expression, a $ addresses the ${} - - ${} - - - special character - ${} - - - parameter substitution - + + ${} + + + special character + ${} + + + parameter substitution + + <link linkend="paramsubref">Parameter substitution</link> @@ -1964,22 +1984,23 @@ echo $var2 # 23skidoo $' ... ' - - $' ... ' - - - special character - $ - - - string expansion - - - string expansion - - - <link linkend="strq">Quoted string + + <indexterm> + <primary>$' ... '</primary> + </indexterm> + <indexterm> + <primary>special character</primary> + <secondary>$</secondary> + </indexterm> + <indexterm> + <primary>string expansion</primary> + </indexterm> + <indexterm> + <primary>string expansion</primary> + </indexterm> + + <formalpara><title><link linkend="strq">Quoted string expansion</link> This construct expands single or multiple escaped octal or hex values into ASCII @@ -2008,22 +2029,24 @@ echo $var2 # 23skidoo $* $@ - - $* - - - special character - $* - - - $@ - positional parameters - - - $@ - + - <link linkend="appref">positional + <indexterm> + <primary>$*</primary> + </indexterm> + <indexterm> + <primary>special character</primary> + <secondary>$*</secondary> + </indexterm> + <indexterm> + <primary>$@</primary> + <secondary>positional parameters</secondary> + </indexterm> + <indexterm> + <primary>$@</primary> + </indexterm> + + <formalpara><title><link linkend="appref">positional parameters</link> @@ -2032,22 +2055,24 @@ echo $var2 # 23skidoo $? - - $? - - - special character - ? - - - exit status - variable - - - exit status - + - exit status variable + + $? + + + special character + ? + + + exit status + variable + + + exit status + + + exit status variable The $? variable holds the exit status of a command, a function, @@ -2059,22 +2084,23 @@ echo $var2 # 23skidoo $$ - - $$ - - - special character - $$ - - - process ID - variable - - - process ID - + + + $$ + + + special character + $$ + + + process ID + variable + + + process ID + - process ID variable + process ID variable The $$ variable holds the process ID @@ -2136,18 +2162,20 @@ echo "a = $a" # a = 123 - - {xxx,yyy,zzz..} - - - special character - {} - - - brace expansion - {xxx,yyy,zzz,...} - Brace expansion + + + + {xxx,yyy,zzz..} + + + special character + {} + + + brace expansion + + Brace expansion echo \"{These,words,are,quoted}\" # " prefix and suffix # "These" "words" "are" "quoted" @@ -2184,18 +2212,18 @@ cp file22.{txt,backup} - - {a..z} - - - special character - {} - - - extended brace expansion - {a..z} + + {a..z} + + + special character + {} + + + extended brace expansion + Extended Brace expansion @@ -2227,19 +2255,20 @@ base64_charset=( {A..Z} {a..z} {0..9} + / = ) {} - - {} - - - special character - {} - - - block of code - - - Block of code [curly brackets] + + + {} + + + special character + {} + + + block of code + + + Block of code [curly brackets] Also referred to as an inline group, this construct, in effect, creates an anonymous function (a function without a @@ -2358,17 +2387,19 @@ echo "First line is $firstline; second line is $secondline" # Won't work. [ ] - - [] - - - special character - [ ] - - - test - + + + [] + + + special character + [ ] + + + test + + test Test expression between @@ -2381,17 +2412,18 @@ echo "First line is $firstline; second line is $secondline" # Won't work. [[ ]] - - [[]] - - - special character - [[ ]] - - - test - + + [[]] + + + special character + [[ ]] + + + test + + test Test expression between [[ ]]. More @@ -2405,17 +2437,19 @@ echo "First line is $firstline; second line is $secondline" # Won't work. [ ] - - [ ] - - - special character - array_element[ ] - - - array element - + + + [ ] + + + special character + array_element[ ] + + + array element + + array element In the context of an array, @@ -2426,17 +2460,19 @@ echo ${Array[1]} [ ] - - [ ] - - - special character - character range - - - regular expression - + + + [ ] + + + special character + character range + + + regular expression + + range of characters As part of a regular @@ -2447,17 +2483,19 @@ echo ${Array[1]} $[ ... ] - - $[ ] - - - special character - integer expansion - - - integer arithmetic (obsolete) - + + + $[ ] + + + special character + integer expansion + + + integer arithmetic (obsolete) + + integer expansion Evaluate integer expression between @@ -2476,17 +2514,19 @@ echo $[$a*$b] # 21 (( )) - - (( )) - - - special character - (( )) - - - integer comparison - + + + (( )) + + + special character + (( )) + + + integer comparison + + integer expansion Expand and evaluate integer expression between @@ -2499,39 +2539,40 @@ echo $[$a*$b] # 21 > &> >& >> < <> - - > - - - >& - - - >> - - - < - - - special character - > - - - special character - >& - - - special character - >> - - - special character - < - - - redirection - + + + > + + + >& + + + >> + + + < + + + special character + > + + + special character + >& + + + special character + >> + + + special character + < + + + redirection + - <link linkend="ioredirref">redirection</link> + <link linkend="ioredirref">redirection</link> @@ -2650,22 +2691,24 @@ command_test $cmd; echo $? # 1 < > - - < - - - special character - < - - - > - ASCII comparison - - - > - + - <link linkend="ltref">ASCII + <indexterm> + <primary><</primary> + </indexterm> + <indexterm> + <primary>special character</primary> + <secondary><</secondary> + </indexterm> + <indexterm> + <primary>></primary> + <secondary>ASCII comparison</secondary> + </indexterm> + <indexterm> + <primary>></primary> + </indexterm> + + <formalpara><title><link linkend="ltref">ASCII comparison</link> veg1=carrots veg2=tomatoes @@ -2685,22 +2728,24 @@ fi \< \> - - \< - - - regular expression - \< - - - > - word boundary - - - > - + - <link linkend="anglebrac">word + <indexterm> + <primary>\<</primary> + </indexterm> + <indexterm> + <primary>regular expression</primary> + <secondary>\<</secondary> + </indexterm> + <indexterm> + <primary>></primary> + <secondary>word boundary</secondary> + </indexterm> + <indexterm> + <primary>></primary> + </indexterm> + + <formalpara><title><link linkend="anglebrac">word boundary</link> in a <link linkend="regexref">regular expression</link> @@ -2711,18 +2756,18 @@ fi | - - | - - - special character - | - - - pipe - - + + | + + + special character + | + + + pipe + + pipe Passes the output (stdout) @@ -2830,22 +2875,23 @@ echo "variable = $variable" # variable = initial_value >| - - >| - - - special character - >| - - - redirection - force - - - noclobber - + + + >| + + + special character + >| + + + redirection + force + + + noclobber + - force redirection (even if + <formalpara><title>force redirection (even if the <link linkend="noclobberref">noclobber option</link> is set) This will forcibly overwrite an existing file. @@ -2854,6 +2900,7 @@ echo "variable = $variable" # variable = initial_value || + || @@ -2868,7 +2915,6 @@ echo "variable = $variable" # variable = initial_value logical operator - <link linkend="orref">OR logical operator</link> In a test construct, the || operator causes @@ -2915,6 +2961,7 @@ echo "variable = $variable" # variable = initial_value && + && @@ -2929,7 +2976,6 @@ echo "variable = $variable" # variable = initial_value logical operator - <link linkend="logops1">AND logical operator</link> @@ -3017,6 +3063,7 @@ param2=${param1:-$DEFAULTVAL} - + - @@ -3028,7 +3075,7 @@ param2=${param1:-$DEFAULTVAL} redirection from/to stdin/stdout - redirection from/to <filename>stdin</filename> or <filename>stdout</filename> [dash] + redirection from/to <filename>stdin</filename> or <filename>stdout</filename> [dash] @@ -3334,6 +3381,7 @@ echo $z # 2 ^ + ^ @@ -3352,7 +3400,6 @@ echo $z # 2 parameter substitution - beginning-of-line In a regular expression, a ^ addresses the - $ + $ + + $ variable $ @@ -3780,7 +3829,6 @@ echo <Ctl-V><Ctl-J> substitution - Let us carefully distinguish between the @@ -3909,6 +3957,7 @@ echo "$uninitialized" # 5 = + = @@ -3916,7 +3965,8 @@ echo "$uninitialized" # 5 variable assignment - the assignment operator (no space before + + the assignment operator (no space before and after) @@ -3999,12 +4049,13 @@ arch=$(uname -m) Local variables + variable local - Variables Variables visible only within a code block or function (see also local variables in @@ -4014,11 +4065,11 @@ arch=$(uname -m) Environmental variables + variable environmental - Variables that affect the behavior of the shell and user interface @@ -4089,11 +4140,12 @@ arch=$(uname -m) Positional parameters + parameter positional - + Arguments passed to the script from the command line Note that \n + \n @@ -4589,11 +4642,12 @@ echo 'Why can'\''t I write '"'"'s between single quotes' newline - means newline + means newline \r + \r @@ -4604,11 +4658,12 @@ echo 'Why can'\''t I write '"'"'s between single quotes' carriage return - means return + means return \t + \t @@ -4619,11 +4674,12 @@ echo 'Why can'\''t I write '"'"'s between single quotes' tabulation - means tab + means tab \v + \v @@ -4634,11 +4690,12 @@ echo 'Why can'\''t I write '"'"'s between single quotes' vertical tabulation - means vertical tab + means vertical tab \b + \b @@ -4649,11 +4706,12 @@ echo 'Why can'\''t I write '"'"'s between single quotes' backspace - means backspace - + means backspace + \a + \a @@ -4670,11 +4728,12 @@ echo 'Why can'\''t I write '"'"'s between single quotes' flash - means alert (beep or flash) + means alert (beep or flash) \0xx + \0xx @@ -4685,7 +4744,7 @@ echo 'Why can'\''t I write '"'"'s between single quotes' octal ASCII - translates to the + translates to the octal ASCII equivalent of 0nn, where nn is a string of digits @@ -4716,6 +4775,7 @@ echo 'Why can'\''t I write '"'"'s between single quotes' \" + \" @@ -4726,13 +4786,14 @@ echo 'Why can'\''t I write '"'"'s between single quotes' quote - gives the quote its literal meaning + gives the quote its literal meaning echo "Hello" # Hello echo "\"Hello\" ... he said." # "Hello" ... he said. \$ + \$ @@ -4743,7 +4804,7 @@ echo "\"Hello\" ... he said." # "Hello" ... he said. dollar - gives the dollar sign its literal meaning + gives the dollar sign its literal meaning (variable name following \$ will not be referenced) echo "\$variable01" # $variable01 @@ -4752,6 +4813,7 @@ echo "The book cost \$7.98." # The book cost $7.98. \\ + \\ @@ -4762,7 +4824,7 @@ echo "The book cost \$7.98." # The book cost $7.98. double backslash - gives the backslash its literal meaning + gives the backslash its literal meaning echo "\\" # Results in \ # Whereas . . . @@ -6268,17 +6330,17 @@ fi - - = - - - operation - = - = - All-purpose assignment operator, which works for both - arithmetic and string assignments. + + = + + + operation + = + + All-purpose assignment operator, which works for both + arithmetic and string assignments. var=27 @@ -6330,6 +6392,7 @@ fi + + + @@ -6343,12 +6406,13 @@ fi plus - plus + plus - + - @@ -6362,12 +6426,13 @@ fi minus - minus + minus * + * @@ -6378,12 +6443,13 @@ fi multiplication - multiplication + multiplication / + / @@ -6394,12 +6460,13 @@ fi division - division + division ** + ** @@ -6410,7 +6477,7 @@ fi exponentiation - + exponentiation @@ -6425,6 +6492,7 @@ echo "z = $z" # z = 125 % + % @@ -6435,7 +6503,6 @@ echo "z = $z" # z = 125 modulo - modulo, or mod (returns the remainder of an integer division @@ -6466,6 +6533,7 @@ echo "z = $z" # z = 125 += + += @@ -6476,7 +6544,6 @@ echo "z = $z" # z = 125 plus-equal - plus-equal (increment variable by a constant) @@ -6497,6 +6564,7 @@ echo "z = $z" # z = 125 -= + -= @@ -6507,13 +6575,14 @@ echo "z = $z" # z = 125 minus-equal - minus-equal (decrement + minus-equal (decrement variable by a constant) *= + *= @@ -6524,7 +6593,7 @@ echo "z = $z" # z = 125 times-equal - times-equal (multiply + times-equal (multiply variable by a constant) let "var *= 4" results in var being multiplied by 4. @@ -6533,6 +6602,7 @@ echo "z = $z" # z = 125 /= + /= @@ -6543,13 +6613,14 @@ echo "z = $z" # z = 125 slash-equal - slash-equal (divide + slash-equal (divide variable by a constant) %= + %= @@ -6560,7 +6631,7 @@ echo "z = $z" # z = 125 mod-equal - mod-equal + mod-equal (remainder of dividing variable by a constant) @@ -6639,6 +6710,7 @@ echo "b = $b" # b=1 << + << @@ -6649,13 +6721,14 @@ echo "b = $b" # b=1 left shift - bitwise left shift (multiplies by 2 + bitwise left shift (multiplies by 2 for each shift position) <<= + <<= @@ -6666,7 +6739,8 @@ echo "b = $b" # b=1 left-shift-equal - left-shift-equal + + left-shift-equal let "var <<= 2" results in var left-shifted 2 bits (multiplied by 4) @@ -6674,6 +6748,7 @@ echo "b = $b" # b=1 >> + >> @@ -6684,13 +6759,14 @@ echo "b = $b" # b=1 right shift - bitwise right shift (divides by 2 + bitwise right shift (divides by 2 for each shift position) >>= + >>= @@ -6701,13 +6777,14 @@ echo "b = $b" # b=1 right-shift-equal - right-shift-equal + right-shift-equal (inverse of <<=) & + & @@ -6719,12 +6796,13 @@ echo "b = $b" # b=1 AND bitwise - bitwise AND + bitwise AND &= + &= @@ -6735,12 +6813,13 @@ echo "b = $b" # b=1 and-equal - bitwise AND-equal + bitwise AND-equal | + | @@ -6752,12 +6831,13 @@ echo "b = $b" # b=1 OR bitwise - bitwise OR + bitwise OR |= + |= @@ -6768,12 +6848,13 @@ echo "b = $b" # b=1 OR-equal - bitwise OR-equal + bitwise OR-equal ~ + ~ @@ -6784,12 +6865,13 @@ echo "b = $b" # b=1 negate - bitwise NOT + bitwise NOT ^ + ^ @@ -6800,12 +6882,13 @@ echo "b = $b" # b=1 XOR - bitwise XOR + bitwise XOR ^= + ^= @@ -6816,7 +6899,7 @@ echo "b = $b" # b=1 XOR-equal - bitwise XOR-equal + bitwise XOR-equal @@ -6828,6 +6911,7 @@ echo "b = $b" # b=1 ! + ! @@ -6838,7 +6922,7 @@ echo "b = $b" # b=1 NOT - NOT + NOT if [ ! -f $FILENAME ] then ... @@ -6847,6 +6931,7 @@ then && + && @@ -6858,7 +6943,7 @@ then AND logical - AND + AND if [ $condition1 ] && [ $condition2 ] # Same as: if [ $condition1 -a $condition2 ] # Returns true if both condition1 and condition2 hold true... @@ -6876,6 +6961,7 @@ if [[ $condition1 && $condition2 ]] # Also works. || + || @@ -6887,7 +6973,7 @@ if [[ $condition1 && $condition2 ]] # Also works. OR logical - OR + OR if [ $condition1 ] || [ $condition2 ] # Same as: if [ $condition1 -o $condition2 ] # Returns true if either condition1 or condition2 holds true... @@ -6924,6 +7010,7 @@ if [[ $condition1 || $condition2 ]] # Also works. , + , @@ -6934,7 +7021,7 @@ if [[ $condition1 || $condition2 ]] # Also works. linking - + Comma operator The comma operator chains together two or more arithmetic operations. All the operations are @@ -7145,6 +7232,7 @@ if [[ "$v1" -gt "$v2" ]] || [[ "$v1" -lt "$v2" ]] && [[ -e "$filename" ] $BASH + $BASH @@ -7155,7 +7243,8 @@ if [[ "$v1" -gt "$v2" ]] || [[ "$v1" -lt "$v2" ]] && [[ -e "$filename" ] path to bash - The path to the Bash + + The path to the Bash binary itself bash$ echo $BASH /bin/bash @@ -7167,6 +7256,7 @@ if [[ "$v1" -gt "$v2" ]] || [[ "$v1" -lt "$v2" ]] && [[ -e "$filename" ] $BASH_ENV + $BASH_ENV @@ -7174,7 +7264,7 @@ if [[ "$v1" -gt "$v2" ]] || [[ "$v1" -lt "$v2" ]] && [[ -e "$filename" ] variable $BASH_ENV - An environmental + An environmental variable pointing to a Bash startup file to be read when a script is invoked @@ -7183,6 +7273,7 @@ if [[ "$v1" -gt "$v2" ]] || [[ "$v1" -lt "$v2" ]] && [[ -e "$filename" ] $BASH_SUBSHELL + $BASH_SUBSHELL @@ -7190,7 +7281,6 @@ if [[ "$v1" -gt "$v2" ]] || [[ "$v1" -lt "$v2" ]] && [[ -e "$filename" ] variable subshell - A variable indicating the subshell level. This is a new addition to Bash, version 3. @@ -7202,6 +7292,7 @@ if [[ "$v1" -gt "$v2" ]] || [[ "$v1" -lt "$v2" ]] && [[ -e "$filename" ] $BASHPID + $BASHPID @@ -7209,7 +7300,7 @@ if [[ "$v1" -gt "$v2" ]] || [[ "$v1" -lt "$v2" ]] && [[ -e "$filename" ] variable process ID - Process ID + Process ID of the current instance of Bash. This is not the same as the $$ variable, but it often gives the same result. @@ -7248,6 +7339,7 @@ echo $BASH_VERSINFO[n] + $BASH_VERSINFO @@ -7255,7 +7347,6 @@ echo variable version information - A 6-element array containing version information about the installed release of Bash. This is similar to $BASH_VERSION, @@ -7282,6 +7373,7 @@ done $BASH_VERSION + $BASH_VERSION @@ -7289,7 +7381,7 @@ done variable $BASH_VERSION - The version of Bash installed on the system + The version of Bash installed on the system bash$ echo $BASH_VERSION @@ -7313,6 +7405,7 @@ done $CDPATH + $CDPATH @@ -7327,7 +7420,7 @@ done cd path - A colon-separated list of search paths + A colon-separated list of search paths available to the cd command, similar in function to the $PATH variable for binaries. @@ -7358,6 +7451,7 @@ done $DIRSTACK + $DIRSTACK @@ -7372,7 +7466,7 @@ done directory stack - The top value in the directory stack + The top value in the directory stack A stack register @@ -7395,6 +7489,7 @@ done $EDITOR + $EDITOR @@ -7405,7 +7500,7 @@ done editor - The default editor invoked by a script, usually + The default editor invoked by a script, usually vi or emacs. @@ -7413,6 +7508,7 @@ done $EUID + $EUID @@ -7423,7 +7519,7 @@ done effective user ID - effective user ID number + effective user ID number Identification number of whatever identity the current user has assumed, perhaps by means of su. @@ -7436,6 +7532,7 @@ done $FUNCNAME + $FUNCNAME @@ -7446,7 +7543,6 @@ done name - Name of the current function xyz23 () { @@ -7466,6 +7562,7 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = $GLOBIGNORE + $GLOBIGNORE @@ -7476,13 +7573,14 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = ignore - A list of filename patterns to be excluded from + A list of filename patterns to be excluded from matching in globbing. $GROUPS + $GROUPS @@ -7493,7 +7591,7 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = groups - Groups current user belongs to + Groups current user belongs to This is a listing (array) of the group id numbers for current user, as recorded in $HOME + $HOME @@ -7535,7 +7634,7 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = directory home - Home directory of the user, usually Home directory of the user, usually /home/username (see ) @@ -7544,6 +7643,7 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = $HOSTNAME + $HOSTNAME @@ -7558,7 +7658,6 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = variable name - The hostname command assigns the system host name at bootup in an init script. However, the gethostname() function @@ -7569,6 +7668,7 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = $HOSTTYPE + $HOSTTYPE @@ -7579,7 +7679,7 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = host type - host type + host type Like $MACHTYPE, identifies the system hardware. bash$ echo $HOSTTYPE @@ -7589,6 +7689,7 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = $IFS + $IFS @@ -7599,7 +7700,7 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = internal field separator - internal field separator + internal field separator This variable determines how Bash recognizes fields, or word boundaries, @@ -7666,6 +7767,7 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = $IGNOREEOF + $IGNOREEOF @@ -7676,13 +7778,14 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = Ignore EOF - Ignore EOF: how many end-of-files (control-D) + Ignore EOF: how many end-of-files (control-D) the shell will ignore before logging out. $LC_COLLATE + $LC_COLLATE @@ -7693,7 +7796,6 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = lowercase collate - Often set in the .bashrc @@ -7720,6 +7822,7 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = $LC_CTYPE + $LC_CTYPE @@ -7730,7 +7833,6 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = lowercase character type - This internal variable controls character interpretation in globbing and pattern @@ -7741,6 +7843,7 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = $LINENO + $LINENO @@ -7751,7 +7854,7 @@ echo "FUNCNAME = $FUNCNAME" # FUNCNAME = line number - This variable is the line number of the shell + This variable is the line number of the shell script in which this variable appears. It has significance only within the script in which it appears, and is chiefly useful for debugging purposes. @@ -7767,6 +7870,7 @@ echo "Last command argument processed = $last_cmd_arg" $MACHTYPE + $MACHTYPE @@ -7777,7 +7881,7 @@ echo "Last command argument processed = $last_cmd_arg" machine type - machine type + machine type Identifies the system hardware. bash$ echo $MACHTYPE i686 @@ -7787,6 +7891,7 @@ echo "Last command argument processed = $last_cmd_arg" $OLDPWD + $OLDPWD @@ -7801,7 +7906,7 @@ echo "Last command argument processed = $last_cmd_arg" directory working - Old working directory + Old working directory (OLD-Print-Working-Directory, previous directory you were in). @@ -7809,6 +7914,7 @@ echo "Last command argument processed = $last_cmd_arg" $OSTYPE + $OSTYPE @@ -7819,7 +7925,7 @@ echo "Last command argument processed = $last_cmd_arg" os type - operating system type + operating system type bash$ echo $OSTYPE linux @@ -7828,6 +7934,7 @@ echo "Last command argument processed = $last_cmd_arg" $PATH + $PATH @@ -7838,7 +7945,7 @@ echo "Last command argument processed = $last_cmd_arg" path to binaries - Path to binaries, usually + Path to binaries, usually /usr/bin/, /usr/X11R6/bin/, /usr/local/bin, etc. @@ -7880,6 +7987,7 @@ echo "Last command argument processed = $last_cmd_arg" $PIPESTATUS + $PIPESTATUS @@ -7887,7 +7995,6 @@ echo "Last command argument processed = $last_cmd_arg" variable pipe - Array variable holding exit status(es) of last executed foreground $PPID + $PPID @@ -8025,7 +8133,7 @@ echo "Last command argument processed = $last_cmd_arg" process ID - + The $PPID of a process is the process ID (pid) of its parent process. @@ -8043,6 +8151,7 @@ echo "Last command argument processed = $last_cmd_arg" $PROMPT_COMMAND + $PROMPT_COMMAND @@ -8050,7 +8159,6 @@ echo "Last command argument processed = $last_cmd_arg" variable prompt - A variable holding a command to be executed just before the primary prompt, $PS1 is to be displayed. @@ -8059,6 +8167,7 @@ echo "Last command argument processed = $last_cmd_arg" $PS1 + $PS1 @@ -8069,12 +8178,13 @@ echo "Last command argument processed = $last_cmd_arg" prompt - This is the main prompt, seen at the command-line. + This is the main prompt, seen at the command-line. $PS2 + $PS2 @@ -8086,7 +8196,6 @@ echo "Last command argument processed = $last_cmd_arg" prompt secondary - The secondary prompt, seen when additional input is expected. It displays as >. @@ -8094,6 +8203,7 @@ echo "Last command argument processed = $last_cmd_arg" $PS3 + $PS3 @@ -8105,7 +8215,7 @@ echo "Last command argument processed = $last_cmd_arg" prompt tertiary - The tertiary prompt, displayed in a + The tertiary prompt, displayed in a select loop (see ). @@ -8113,6 +8223,7 @@ echo "Last command argument processed = $last_cmd_arg" $PS4 + $PS4 @@ -8124,7 +8235,6 @@ echo "Last command argument processed = $last_cmd_arg" prompt quartenary - The quartenary prompt, shown at the beginning of each line of output when invoking a script with the -x [verbose trace] @@ -8144,6 +8254,7 @@ set -x $PWD + $PWD @@ -8158,7 +8269,6 @@ set -x directory working - Working directory (directory you are in at the time) This is the analog to the pwd builtin command. @@ -8168,6 +8278,7 @@ set -x $REPLY + $REPLY @@ -8182,7 +8293,7 @@ set -x reply read - The default value when a variable is not + The default value when a variable is not supplied to read. Also applicable to select menus, but only supplies the item number of the variable chosen, @@ -8193,6 +8304,7 @@ set -x $SECONDS + $SECONDS @@ -8207,13 +8319,14 @@ set -x runtime seconds - The number of seconds the script has been running. + The number of seconds the script has been running. &seconds; $SHELLOPTS + $SHELLOPTS @@ -8224,7 +8337,6 @@ set -x shell options - The list of enabled shell options, a readonly variable. bash$ echo $SHELLOPTS @@ -8236,6 +8348,7 @@ set -x $SHLVL + $SHLVL @@ -8246,7 +8359,6 @@ set -x shell level - Shell level, how deeply Bash is nested. @@ -8275,6 +8387,7 @@ set -x $TMOUT + $TMOUT @@ -8285,7 +8398,7 @@ set -x timeout interval - If the $TMOUT + If the $TMOUT environmental variable is set to a non-zero value time, then the shell prompt will time out after $time seconds. This will cause a @@ -8353,6 +8466,7 @@ echo "Your favorite song is $song." $UID + $UID @@ -8363,7 +8477,7 @@ echo "Your favorite song is $song." user ID - User ID number + User ID number Current user's user identification number, as recorded in $0, $1, $2, etc. + $0 @@ -8448,7 +8563,6 @@ echo "Your favorite song is $song." parameter positional - Positional parameters, passed from command line to script, passed to a function, or set to a variable (see $# + $# @@ -8474,7 +8589,7 @@ echo "Your favorite song is $song." positional number of - Number of command-line arguments + Number of command-line arguments The words argument and parameter are often used interchangeably. In the context of this document, they @@ -8486,6 +8601,7 @@ echo "Your favorite song is $song." $* + $* @@ -8502,7 +8618,6 @@ echo "Your favorite song is $song." positional all - All of the positional parameters, seen as a single word $* must be quoted. @@ -8511,6 +8626,7 @@ echo "Your favorite song is $song." $@ + $@ @@ -8523,8 +8639,6 @@ echo "Your favorite song is $song." all - - Same as $*, but each parameter is a quoted string, that is, the parameters are passed on intact, without interpretation or expansion. This means, @@ -8595,6 +8709,7 @@ echo "$@" # 3 4 5 $- + $- @@ -8605,7 +8720,6 @@ echo "$@" # 3 4 5 flags - Flags passed to script (using set). See . This was originally a ksh @@ -8618,6 +8732,7 @@ echo "$@" # 3 4 5 $! + $! @@ -8629,7 +8744,6 @@ echo "$@" # 3 4 5 PID last job background - PID (process ID) of last job run in background @@ -8718,6 +8832,7 @@ exit $_ + $_ @@ -8729,7 +8844,6 @@ exit underscore last argument - Special variable set to final argument of previous command executed. @@ -8756,6 +8870,7 @@ echo $_ # : $? + $? @@ -8766,7 +8881,7 @@ echo $_ # : exit status - Exit status + Exit status of a command, function, or the script itself (see ) @@ -8774,6 +8889,7 @@ echo $_ # : $$ + $$ @@ -8785,7 +8901,7 @@ echo $_ # : PID of script - Process ID (PID) of + Process ID (PID) of the script itself. Within a script, inside a subshell, @@ -8811,6 +8927,8 @@ echo $_ # : + Typing variables: <command>declare</command> or + <command>typeset</command> declare @@ -8826,8 +8944,6 @@ echo $_ # : command typeset - Typing variables: <command>declare</command> or - <command>typeset</command> @@ -9040,6 +9156,7 @@ bar # Prints nothing. + $RANDOM: generate random integer $RANDOM @@ -9048,7 +9165,6 @@ bar # Prints nothing. variable $RANDOM - $RANDOM: generate random integer Anyone who attempts to generate random numbers by @@ -9229,35 +9345,37 @@ bar # Prints nothing. ${#string} + string length parameter substitution - + expr length $string + string length expr - These are the equivalent of + These are the equivalent of strlen() in C. expr "$string" : '.*' + string length expr - stringZ=abcABC123ABCabc @@ -9282,12 +9400,12 @@ echo `expr "$stringZ" : '.*'` # 15 expr match "$string" '$substring' + substring length expr - $substring is a regular expression. @@ -9295,12 +9413,12 @@ echo `expr "$stringZ" : '.*'` # 15 expr "$string" : '$substring' + substring length expr - $substring is a regular expression. @@ -9323,12 +9441,12 @@ echo `expr "$stringZ" : 'abc[A-Z]*.2'` # 8 expr index $string $substring + substring index expr - Numerical position in $string of first character in $substring that matches. @@ -9354,12 +9472,12 @@ echo `expr index "$stringZ" 1c` # 3 ${string:position} + substring extraction - Extracts substring from $string at $position. If the $string parameter is @@ -9375,12 +9493,12 @@ echo `expr index "$stringZ" 1c` # 3 ${string:position:length} + substring extraction - Extracts $length characters of substring from $string at $position. @@ -9443,12 +9561,12 @@ echo ${*:2:3} # Echoes three positional parameters, starting at second. expr substr $string $position $length + substring extraction expr - Extracts $length characters from $string starting at @@ -9470,12 +9588,12 @@ echo `expr substr $stringZ 4 3` # ABC expr match "$string" '\($substring\)' + substring extraction expr - Extracts $substring at beginning of $string, where $substring is a expr "$string" : '\($substring\)' + substring extraction expr - Extracts $substring at beginning of $string, @@ -9511,12 +9629,12 @@ echo `expr "$stringZ" : '\(.......\)'` # abcABC1 expr match "$string" '.*\($substring\)' + substring extraction expr - Extracts $substring at end of $string, where @@ -9527,12 +9645,12 @@ echo `expr "$stringZ" : '\(.......\)'` # abcABC1 expr "$string" : '.*\($substring\)' + substring extraction expr - Extracts $substring at end of $string, @@ -9557,12 +9675,12 @@ echo `expr "$stringZ" : '.*\(......\)'` # ABCabc ${string#substring} + substring removal - Deletes shortest match of $substring from front of @@ -9572,12 +9690,12 @@ echo `expr "$stringZ" : '.*\(......\)'` # ABCabc ${string##substring} + substring removal - Deletes longest match of $substring from @@ -9610,12 +9728,12 @@ echo ${stringZ##$X} # abc ${string%substring} + substring removal - Deletes shortest match of $substring from @@ -9644,12 +9762,12 @@ done ### This could be condensed into a "one-liner" if desired. ${string%%substring} + substring removal - Deletes longest match of $substring from @@ -9703,12 +9821,12 @@ echo ${stringZ%%b*c} # a ${string/substring/replacement} + substring replacement - Replace first match of $substring with @@ -9726,12 +9844,12 @@ echo ${stringZ%%b*c} # a ${string//substring/replacement} + substring replacement - Replace all matches of $substring with @@ -9773,12 +9891,12 @@ echo ${stringZ//abc} # ABC123ABC ${string/#substring/replacement} + substring replacement - If $substring matches front end of $string, substitute @@ -9790,12 +9908,12 @@ echo ${stringZ//abc} # ABC123ABC ${string/%substring/replacement} + substring replacement - If $substring matches back end of @@ -10395,6 +10513,7 @@ echo $c # something_else for arg in [list] + for @@ -10411,7 +10530,6 @@ echo $c # something_else loop for - This is the basic looping construct. It differs significantly from its C counterpart. @@ -10672,6 +10790,7 @@ for n in 1 2 3 while + while @@ -10685,7 +10804,6 @@ for n in 1 2 3 loop while - This construct tests for a condition at the top of a loop, and keeps looping as long as that condition is true (returns a 0 until + until @@ -10871,7 +10990,6 @@ done until - This construct tests for a condition at the top of a loop, and keeps looping as long as that condition is false (opposite of while @@ -10964,6 +11082,9 @@ done <anchor id="brkcont1"/>Commands affecting loop behavior + break + continue + break @@ -10978,9 +11099,6 @@ done loop continue - break - continue - The break and continue loop control commands These are shell case (in) / esac + case @@ -11081,7 +11200,6 @@ done menus - The case construct is the shell scripting analog to switch in C/C++. @@ -11230,13 +11348,13 @@ done select + select menus - The select construct, adopted from the Korn Shell, is yet another tool for building menus. @@ -11666,11 +11784,13 @@ File_contents2=$(<$file2) # Bash permits this also. Arithmetic expansion with backticks (often used in - conjunction with expr) + conjunction with expr) + + arithmetic expansion arithmetic expansion - + z=`expr $z + 3` # The 'expr' command performs the expansion. @@ -11680,14 +11800,14 @@ File_contents2=$(<$file2) # Bash permits this also. Arithmetic expansion with double parentheses + and using let + double parentheses - and using let let let - The use of backticks (backquotes) in arithmetic @@ -12303,6 +12423,7 @@ echo "This line uses the \"echo\" builtin." echo + echo @@ -12310,7 +12431,6 @@ echo "This line uses the \"echo\" builtin." command echo - prints (to stdout) an expression or variable (see ). echo Hello @@ -12443,6 +12563,7 @@ echo $string1 printf + printf @@ -12450,7 +12571,6 @@ echo $string1 command printf - The printf, formatted print, command is an enhanced echo. It is a limited variant of the C language @@ -12504,11 +12624,14 @@ cd $var || error $"Can't cd to %s." "$var" - read + read + + read command read - Reads the value + + Reads the value of a variable from stdin, that is, interactively fetches input from the keyboard. The option lets read @@ -12661,6 +12784,7 @@ while read f; do cd + cd @@ -12668,7 +12792,6 @@ while read f; do command cd - The familiar cd change directory command finds use in scripts where execution of a command requires being in a specified directory. @@ -12704,6 +12827,7 @@ while read f; do pwd + pwd @@ -12722,7 +12846,7 @@ while read f; do directory working - Print Working Directory. This gives the user's + Print Working Directory. This gives the user's (or script's) current directory (see ). The effect is identical to reading the value of the builtin variable pushd popd dirs + pushd @@ -12763,7 +12888,7 @@ while read f; do bookmark - This command set is a mechanism for bookmarking + This command set is a mechanism for bookmarking working directories, a means of moving back and forth through directories in an orderly manner. A pushdown stack is used to keep track @@ -12815,6 +12940,7 @@ while read f; do let + let @@ -12822,7 +12948,6 @@ while read f; do command let - The let command carries out arithmetic operations on variables. @@ -12877,6 +13002,7 @@ echo $? # 1 eval + eval @@ -12884,7 +13010,6 @@ echo $? # 1 command eval - eval arg1 [arg2] ... [argN] @@ -12998,6 +13123,7 @@ eval eval echo $a # d set + set @@ -13005,7 +13131,7 @@ eval eval echo $a # d command set - The set command changes + The set command changes the value of internal script variables/options. One use for this is to toggle option flags which help determine the behavior of the @@ -13067,6 +13193,7 @@ eval eval echo $a # d unset + unset @@ -13074,7 +13201,7 @@ eval eval echo $a # d command unset - The unset command deletes a + The unset command deletes a shell variable, effectively setting it to null. Note that this command does not affect positional parameters. @@ -13107,6 +13234,7 @@ eval eval echo $a # d export + export @@ -13114,7 +13242,6 @@ eval eval echo $a # d command export - The export @@ -13182,6 +13309,7 @@ eval eval echo $a # d declare typeset + declare @@ -13196,7 +13324,6 @@ eval eval echo $a # d command typeset - The declare and typeset commands specify and/or restrict properties of variables. @@ -13205,6 +13332,7 @@ eval eval echo $a # d readonly + readonly @@ -13212,7 +13340,7 @@ eval eval echo $a # d command readonly - Same as declare -r, + Same as declare -r, sets a variable as read-only, or, in effect, as a constant. Attempts to change the variable fail with an error message. This is the shell analog of the @@ -13224,6 +13352,7 @@ eval eval echo $a # d getopts + getopts @@ -13245,7 +13374,6 @@ eval eval echo $a # d variable $OPTARG - This powerful tool parses command-line arguments passed to the script. This is the Bash analog of the getopt external command and the @@ -13353,6 +13481,7 @@ shift $(($OPTIND - 1)) source . (dot command) + source @@ -13368,7 +13497,6 @@ shift $(($OPTIND - 1)) . - This command, when invoked from the command-line, executes a script. Within a script, a @@ -13428,6 +13556,7 @@ shift $(($OPTIND - 1)) exit + exit @@ -13435,7 +13564,6 @@ shift $(($OPTIND - 1)) command exit - Unconditionally terminates a script. Technically, an exit only terminates the @@ -13464,6 +13592,7 @@ shift $(($OPTIND - 1)) exec + exec @@ -13471,7 +13600,6 @@ shift $(($OPTIND - 1)) command exec - This shell builtin replaces the current process with @@ -13515,6 +13643,7 @@ shift $(($OPTIND - 1)) shopt + shopt @@ -13522,7 +13651,6 @@ shift $(($OPTIND - 1)) command shopt - This command permits changing shell options on the fly (see and ). It often appears in the Bash @@ -13544,6 +13672,7 @@ pwd # /home caller + caller @@ -13551,7 +13680,6 @@ pwd # /home command caller - Putting a caller command inside a function echoes to stdout information about @@ -13596,6 +13724,7 @@ caller 0 # Has no effect because it's not inside a function. true + true @@ -13603,7 +13732,8 @@ caller 0 # Has no effect because it's not inside a function.command true - A command that returns a successful + + A command that returns a successful (zero) exit status, but does nothing else. @@ -13632,6 +13762,7 @@ done false + false @@ -13639,7 +13770,7 @@ done command false - A command that returns an unsuccessful A command that returns an unsuccessful exit status, but does nothing else. @@ -13678,6 +13809,7 @@ done type [cmd] + type @@ -13689,7 +13821,7 @@ done variable which - Similar to the Similar to the which external command, type cmd identifies cmd. Unlike which, @@ -13722,6 +13854,7 @@ done hash [cmds] + hash @@ -13736,7 +13869,7 @@ done variable $PATH - Records the path + Records the path name of specified commands -- in the shell hash table @@ -13770,6 +13903,7 @@ done bind + bind @@ -13777,7 +13911,6 @@ done bind key bindings - The bind builtin displays or modifies readline @@ -13792,6 +13925,7 @@ done help + help @@ -13799,7 +13933,6 @@ done command - Gets a short usage summary of a shell builtin. This is the counterpart to whatis, @@ -13833,21 +13966,21 @@ done jobs - - jobs - - - command - jobs - - - ps - - - command - ps - + + jobs + + + command + jobs + + + ps + + + command + ps + Lists the jobs running in the background, giving the job number. @@ -13887,14 +14020,14 @@ done disown - - disown - - - command - disown - + + disown + + + command + disown + Remove job(s) from the shell's table of active jobs. @@ -13903,21 +14036,21 @@ done fg bg - - fg - - - command - foreground - - - background - - - command - bg - - + + + fg + + + command + foreground + + + background + + + command + bg + The fg command switches a job running in the background into the foreground. The bg command restarts a suspended job, and @@ -13929,14 +14062,14 @@ done wait - - wait - - - command - wait - + + wait + + + command + wait + Suspend script execution until all jobs running in background have terminated, or until the job number or @@ -14032,6 +14165,7 @@ wait suspend + suspend @@ -14039,7 +14173,6 @@ wait command suspend - This has a similar effect to ControlZ, but it suspends the shell (the shell's parent process should @@ -14049,14 +14182,14 @@ wait logout - - logout - - - command - log out - + + logout + + + command + log out + Exit a login shell, optionally specifying an exit status. @@ -14064,14 +14197,14 @@ wait times - - times - - - command - times - + + times + + + command + times + Gives statistics on the system time elapsed when executing commands, in the following form: 0m0.020s 0m0.020s @@ -14084,14 +14217,14 @@ wait kill - - kill - - + + + kill + + command kill - Forcibly terminate a process by sending it an appropriate terminate signal (see ). @@ -14123,14 +14256,15 @@ wait killall - - killall - - - command - kill - - The killall command + + + killall + + + command + kill + + The killall command kills a running process by name, rather than by process ID. If there are multiple instances of a particular command running, @@ -14147,6 +14281,7 @@ wait command + command @@ -14154,7 +14289,7 @@ wait command command - The command directive + The command directive disables aliases and functions for the command immediately following it. @@ -14172,6 +14307,7 @@ wait builtin + builtin @@ -14179,7 +14315,7 @@ wait command builtin - Invoking builtin + Invoking builtin BUILTIN_COMMAND runs the command BUILTIN_COMMAND as a shell builtin, temporarily disabling @@ -14190,6 +14326,7 @@ wait enable + enable @@ -14197,7 +14334,6 @@ wait command enable - This either enables or disables a shell builtin command. As an example, enable -n @@ -14230,6 +14366,7 @@ wait autoload + autoload @@ -14237,7 +14374,6 @@ wait command autoloader - This is a port to Bash of the ksh autoloader. With @@ -14326,6 +14462,7 @@ wait ls + ls @@ -14333,7 +14470,6 @@ wait command ls - The basic file list command. It is all too easy to underestimate the power of this humble command. For example, using the , recursive option, @@ -14399,6 +14535,7 @@ wait cat tac + cat @@ -14413,7 +14550,6 @@ wait command tac - cat, an acronym for concatenate, lists a file to stdout. When @@ -14463,6 +14599,7 @@ tr a-z A-Z < filename # Same effect, but starts one less process, rev + rev @@ -14470,7 +14607,6 @@ tr a-z A-Z < filename # Same effect, but starts one less process, command rev - reverses each line of a file, and outputs to stdout. This does not have the same effect as tac, as it preserves the order of @@ -14497,6 +14633,7 @@ tr a-z A-Z < filename # Same effect, but starts one less process, cp + cp @@ -14504,7 +14641,6 @@ tr a-z A-Z < filename # Same effect, but starts one less process, command cp - This is the file copy command. cp file1 file2 copies file1 @@ -14561,6 +14697,7 @@ tr a-z A-Z < filename # Same effect, but starts one less process, rm + rm @@ -14568,7 +14705,6 @@ tr a-z A-Z < filename # Same effect, but starts one less process, command rm - Delete (remove) a file or files. The option forces removal of even readonly files, and is useful for bypassing user input in a script. @@ -14615,6 +14751,7 @@ tr a-z A-Z < filename # Same effect, but starts one less process, rmdir + rmdir @@ -14622,7 +14759,6 @@ tr a-z A-Z < filename # Same effect, but starts one less process, command rmdir - Remove directory. The directory must be empty of all files -- including invisible dotfiles @@ -14646,6 +14782,7 @@ tr a-z A-Z < filename # Same effect, but starts one less process, mkdir + mkdir @@ -14653,7 +14790,6 @@ tr a-z A-Z < filename # Same effect, but starts one less process, command mkdir - Make directory, creates a new directory. For example, mkdir -p project/programs/December creates the named directory. The @@ -14665,6 +14801,7 @@ tr a-z A-Z < filename # Same effect, but starts one less process, chmod + chmod @@ -14672,7 +14809,6 @@ tr a-z A-Z < filename # Same effect, but starts one less process, command chmod - Changes the attributes of an existing file or directory (see ). @@ -14727,6 +14863,7 @@ chmod 000 directory-name chattr + chattr @@ -14734,7 +14871,6 @@ chmod 000 directory-name command chattr - Change file attributes. This is analogous to @@ -14857,6 +14993,7 @@ chmod 000 directory-name man info + man @@ -14871,7 +15008,6 @@ chmod 000 directory-name command info - These commands access the manual and information pages on system commands and installed utilities. When available, the @@ -14901,6 +15037,7 @@ chmod 000 directory-name find + find @@ -14925,7 +15062,6 @@ chmod 000 directory-name \; - -exec COMMAND \; Carries out COMMAND on @@ -15054,6 +15190,7 @@ done xargs + xargs @@ -15061,7 +15198,6 @@ done command xargs - A filter for feeding arguments to a command, and also a tool for assembling the commands themselves. It breaks a data stream into small enough chunks for filters and @@ -15219,6 +15355,7 @@ ls *gif | xargs -t -n1 -P2 gif2png expr + expr @@ -15226,7 +15363,6 @@ ls *gif | xargs -t -n1 -P2 gif2png command expr - All-purpose expression evaluator: Concatenates and evaluates the arguments according to the operation given (arguments must be separated @@ -15352,6 +15488,7 @@ LRFDATE=`expr "$LRFDATE" : '[[:space:]]*\(.*\)[[:space:]]*$'` date + date @@ -15359,7 +15496,6 @@ LRFDATE=`expr "$LRFDATE" : '[[:space:]]*\(.*\)[[:space:]]*$'` command date - Simply invoked, date prints the date and time to stdout. Where this command gets interesting is in its formatting and parsing options. @@ -15441,6 +15577,7 @@ OneYearAgo=$(date --date='1 year ago') zdump + zdump @@ -15448,7 +15585,6 @@ OneYearAgo=$(date --date='1 year ago') command time zone dump - Time zone dump: echoes the time in a specified time zone. bash$ zdump EST @@ -15460,6 +15596,7 @@ OneYearAgo=$(date --date='1 year ago') time + time @@ -15467,7 +15604,6 @@ OneYearAgo=$(date --date='1 year ago') command time - Outputs verbose timing statistics for executing a command. @@ -15493,6 +15629,7 @@ OneYearAgo=$(date --date='1 year ago') touch + touch @@ -15500,7 +15637,6 @@ OneYearAgo=$(date --date='1 year ago') command touch - Utility for updating access/modification times of a file to current system time or other specified time, @@ -15540,6 +15676,7 @@ OneYearAgo=$(date --date='1 year ago') at + at @@ -15554,7 +15691,6 @@ OneYearAgo=$(date --date='1 year ago') command cron - The at job control command executes a given set of commands at a specified time. Superficially, it resembles cron, however, @@ -15586,6 +15722,7 @@ OneYearAgo=$(date --date='1 year ago') batch + batch @@ -15600,7 +15737,6 @@ OneYearAgo=$(date --date='1 year ago') command at - The batch job control command is similar to at, but it runs a command list when the system @@ -15621,6 +15757,7 @@ OneYearAgo=$(date --date='1 year ago') cal + cal @@ -15628,7 +15765,6 @@ OneYearAgo=$(date --date='1 year ago') command cal - Prints a neatly formatted monthly calendar to stdout. Will do current year or a large range of past and future years. @@ -15637,6 +15773,7 @@ OneYearAgo=$(date --date='1 year ago') sleep + sleep @@ -15644,7 +15781,6 @@ OneYearAgo=$(date --date='1 year ago') command sleep - This is the shell equivalent of a wait loop. It pauses for a specified number of seconds, doing nothing. It can be useful for timing or @@ -15667,6 +15803,7 @@ OneYearAgo=$(date --date='1 year ago') usleep + usleep @@ -15674,7 +15811,6 @@ OneYearAgo=$(date --date='1 year ago') command usleep - Microsleep (the u may be read as the Greek mu, or micro- @@ -15700,6 +15836,7 @@ OneYearAgo=$(date --date='1 year ago') hwclock clock + hwclock @@ -15714,7 +15851,6 @@ OneYearAgo=$(date --date='1 year ago') command clock - The hwclock command accesses or adjusts the machine's hardware clock. Some options require root privileges. The @@ -15744,6 +15880,7 @@ OneYearAgo=$(date --date='1 year ago') sort + sort @@ -15751,7 +15888,6 @@ OneYearAgo=$(date --date='1 year ago') command sort - File sort utility, often used as a filter in a pipe. This command sorts a text stream or file forwards or backwards, or according to various @@ -15765,6 +15901,7 @@ OneYearAgo=$(date --date='1 year ago') tsort + tsort @@ -15772,7 +15909,6 @@ OneYearAgo=$(date --date='1 year ago') command topological sort - Topological sort, reading in pairs of whitespace-separated strings and sorting @@ -15789,6 +15925,7 @@ OneYearAgo=$(date --date='1 year ago') uniq + uniq @@ -15796,7 +15933,6 @@ OneYearAgo=$(date --date='1 year ago') command uniq - This filter removes duplicate lines from a sorted file. It is often seen in a pipe coupled with sort. @@ -15877,6 +16013,7 @@ OneYearAgo=$(date --date='1 year ago') expand unexpand + expand @@ -15891,7 +16028,6 @@ OneYearAgo=$(date --date='1 year ago') command unexpand - The expand filter converts tabs to spaces. It is often used in a pipe. @@ -15903,6 +16039,7 @@ OneYearAgo=$(date --date='1 year ago') cut + cut @@ -15917,7 +16054,6 @@ OneYearAgo=$(date --date='1 year ago') command awk - A tool for extracting fields from files. It is similar to the print $N command set in paste + paste @@ -15996,7 +16133,6 @@ done command cut - Tool for merging together different files into a single, multi-column file. In combination with cut, useful for creating system log @@ -16026,6 +16162,7 @@ done join + join @@ -16033,7 +16170,6 @@ done command join - Consider this a special-purpose cousin of paste. This powerful utility allows merging two files in a meaningful fashion, which essentially @@ -16077,6 +16213,7 @@ done head + head @@ -16084,7 +16221,6 @@ done command head - lists the beginning of a file to stdout. The default is 10 lines, but a different number can be specified. The command has a number of @@ -16106,6 +16242,7 @@ done tail + tail @@ -16113,7 +16250,6 @@ done command tail - lists the (tail) end of a file to stdout. The default is 10 lines, but this can be changed with the option. @@ -16156,6 +16292,7 @@ done grep + grep @@ -16163,7 +16300,6 @@ done command grep - A multi-purpose file search tool that uses Regular Expressions. It was originally a command/filter in the @@ -16438,6 +16574,7 @@ Here is some text. look + look @@ -16445,7 +16582,6 @@ Here is some text. command look - The command look works like grep, but does a lookup on a dictionary, a sorted word list. @@ -16465,6 +16601,7 @@ Here is some text. sed awk + sed @@ -16479,7 +16616,6 @@ Here is some text. command awk - Scripting languages especially suited for parsing text files and command output. May be embedded singly or in combination in pipes and shell scripts. @@ -16508,6 +16644,7 @@ Here is some text. wc + wc @@ -16515,7 +16652,6 @@ Here is some text. command wc - wc gives a word count on a file or I/O stream: @@ -16578,6 +16714,7 @@ Here is some text. tr + tr @@ -16585,7 +16722,6 @@ Here is some text. command tr - character translation filter. Must use quoting and/or @@ -16706,6 +16842,7 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' fold + fold @@ -16713,7 +16850,6 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' command fold - A filter that wraps lines of input to a specified width. This is especially useful with the option, which breaks lines at word spaces (see fmt + fmt @@ -16730,7 +16867,6 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' command fmt - Simple-minded file formatter, used as a filter in a pipe to wrap long lines of text output. @@ -16753,6 +16889,7 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' col + col @@ -16760,7 +16897,6 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' command reverse line feed - This deceptively named filter removes reverse line feeds from an input stream. It also attempts to replace whitespace with equivalent tabs. The chief use of @@ -16772,6 +16908,7 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' column + column @@ -16779,7 +16916,6 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' command column - Column formatter. This filter transforms list-type text output into a pretty-printed table by inserting tabs at appropriate places. @@ -16795,6 +16931,7 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' colrm + colrm @@ -16802,7 +16939,6 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' command colrm - Column removal filter. This removes columns (characters) from a file and writes the file, lacking the range of specified columns, back to stdout. @@ -16820,6 +16956,7 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' nl + nl @@ -16827,7 +16964,6 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' command fmt - Line numbering filter: nl filename lists filename to stdout, but inserts consecutive @@ -16850,6 +16986,7 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' pr + pr @@ -16857,7 +16994,6 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' command pr - Print formatting filter. This will paginate files (or stdout) into sections suitable for hard copy printing or viewing on screen. Various options @@ -16883,6 +17019,7 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' gettext + gettext @@ -16890,7 +17027,6 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' command localization - The GNU gettext package is a set of utilities for localizing @@ -16908,6 +17044,7 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' msgfmt + msgfmt @@ -16915,7 +17052,6 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' command localization - A program for generating binary message catalogs. It is used for localization. @@ -16924,6 +17060,7 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' iconv + iconv @@ -16931,7 +17068,6 @@ echo $x | tr "a-z" 'oh, turtleneck Phrase Jar!' command encoding - A utility for converting file(s) to a different encoding (character set). Its chief use is for recode + recode @@ -16963,7 +17100,6 @@ function write_utf8_string { command encoding - Consider this a fancier version of iconv, above. This very versatile utility for converting a file to a different encoding scheme. @@ -16975,6 +17111,7 @@ function write_utf8_string { TeX gs + TeX @@ -16989,7 +17126,6 @@ function write_utf8_string { command Postscript - TeX and Postscript are text markup languages used for preparing copy for @@ -17009,6 +17145,7 @@ function write_utf8_string { texexec + texexec @@ -17016,7 +17153,6 @@ function write_utf8_string { command pdf - Utility for processing TeX and pdf files. Found in @@ -17039,6 +17175,7 @@ function write_utf8_string { enscript + enscript @@ -17046,7 +17183,6 @@ function write_utf8_string { command PostScript - Utility for converting plain text file to PostScript For example, enscript filename.txt -p filename.ps produces the PostScript output file @@ -17058,6 +17194,7 @@ function write_utf8_string { groff tbl eqn + groff @@ -17079,7 +17216,6 @@ function write_utf8_string { command equation - Yet another text markup and display formatting language is groff. This is the enhanced GNU version @@ -17111,6 +17247,7 @@ function write_utf8_string { lex yacc + lex @@ -17125,7 +17262,6 @@ function write_utf8_string { command bison - The lex lexical analyzer produces programs for pattern matching. This has been replaced @@ -17152,6 +17288,7 @@ function write_utf8_string { tar + tar @@ -17159,7 +17296,6 @@ function write_utf8_string { command tar - The standard UNIX archiving utility. @@ -17253,6 +17389,7 @@ function write_utf8_string { shar + shar @@ -17260,7 +17397,6 @@ function write_utf8_string { command archive - Shell archiving utility. The text and/or binary files in a shell archive are @@ -17287,6 +17423,7 @@ function write_utf8_string { ar + ar