Command aliases
Alias comalias= ' COMMAND [options] [arguments] '
Aliases defined in the shell are valid only in the current shell life cycle: The valid range of aliases is only the current shell process:
Ualias Comalias Deleting aliases
Alias cp = ' Cp-i '
command to replace $ (commands) with the ' command '
To replace a subcommand in a command with the process of executing the result
echo "The current directory Is/etc"
echo "The current directory is $ (PWD)"
File-2013-12-12-12-13.txt
Date +%f-%h-$M-%s
Touch./file-$ (date +%f-%h-$M-%s). txt
BASH-supported quotes
": Command substitution
"", double quotes, weak references can implement variable substitution
', single quote strong reference can not implement variable substitution
File name wildcard globbing
* Any character of any length can be no longer
? Match any single character
[] Specify any single character in any specified range
[ABC] [A-z] [A-za-z0-9]
[^]: matches any single character outside the specified range
[^0-9] Non-digital
[: Space:] white space characters
[[: Space:]] Blank Character Set
[:p UNCT:] Punctuation
[: Lower:] lowercase letters
[: Upper:] Uppercase
[: Alpha:] uppercase and lowercase letters
[:d Igit:] Number
[: Alnum:] numbers and uppercase and lowercase letters
also supports reverse [^[:space:]]
Can view man 7 glob
Touch A123 ABC abc123 XYZ x12 xyz123
Start with a letter A
LS A * =>a123 ABC abc123
Letter A begins with a 3-terminated character
LS a*3
Any number of files following the beginning of the letter
[A-za-z]*[0-9]
? y* ==>xyz xyz123
[[: Alpha:]]*[[:space:]]*[[:alpha:]]
The letter begins with a white-space character at the end of the letter
*[0-9]* *[[:d igit:]]*
Number end does not contain whitespace characters *[^[:space:]]*[0-9] There is a problem ... The regular can handle
Non-letter non-numeric: *[^[:alnum:]]*
This article is from the "Jiawu notes" blog, so be sure to keep this source http://jiawu.blog.51cto.com/9349234/1586768
03_03 bash feature details (bottom)