Five:SPECIAL CHARACTERS Flashcards
semicolon ;
A semicolon allows to write multiple lines of command in one line.
Note: there is a space after ever semicolon
double semicolon ;;
The double semicolon is used in the case switch expression
The case expression
case $variable in var1) statement ;; var2) statement ;; *) statement ;; esac
dot .
as a component of a filename
also file is hidden if it is prefixed by a dot
dot . in character match
match only one character
double quote
preserve most of the special chracter
comma operator
all evaluated, but only the last one returned
comma in concatenation
/usr/{,share/}bin
represents
/usr/bin
/usr/share/bin
command colon
”:” is itself a bash built-in and may be equivalent to true
:»_space; filename This combination do nothing to an existing file but create it if it does not exist
: > filename This empty a file
colon as a field separator
PATH=PATH1:PATH2
a double parenthesis
((condition ? state1 : state2))
${parameter?err_msg}, ${parameter:?err_msg}
if parameter is set, use it, else print err_msg
? serves as a single wild card
?name
listing arguments
”$@” and “$*” note that these two should be quoted
$?
exit status