Wild Cards in Linux - Every Beginner should know
·
Hello, techies!
Welcome to my article on Linux wildcards, wildcards are symbols or set of symbols used to substitute in place of a character or characters for the pattern match in a string.
| Wildcard | Description |
| ? | denote single character |
| ???? | to specify number of character of that filename size |
| * | every thing or all |
| [] | represent range |
| ls m[a-d]n | file start with m and end with n having charcter including a to d |
| {.doc,.pdf} | match all doc file and pdf file |
| [!9] | ignore 9 or don't match 9 |
| \ | string literal skip |
| touch \ | to create a file name \ |
| $1, $2, $3, ... | are the positional parameters |
| "$@" | is an array-like construct of all positional parameters, {$1, $2, $3 ...} |
| "$*" | is the IFS expansion of all positional parameters, $1 $2 $3 .... |
| $# | is the number of positional parameters |
| $- | current options set for the shell |
| $$ | PID of the current shell (not subshell) |
| $IFS | is the (input) field separator |
| $? | is the most recent foreground pipeline exit status |
| $! | is the PID of the most recent background command |
| $0 | is the name of the shell or shell script |
| $_ | most recent parameter (or the abs path of the command to start the current shell immediately after startup) |
Thank you for reading!
Sources: Ref
更多推荐




所有评论(0)