mirror of
https://github.com/onceupon/Bash-Oneliner
synced 2025-02-16 21:18:23 +00:00
add more bash globbing examples
This commit is contained in:
parent
1f64f38cc5
commit
c64c6fbf50
1 changed files with 11 additions and 4 deletions
15
README.md
15
README.md
|
@ -92,10 +92,17 @@ Esc + c
|
|||
|
||||
##### Bash globbing
|
||||
```bash
|
||||
# '*' character serves as a "wild card" for filename expansion.
|
||||
# '?' character serves as a single-character "wild card" for filename expansion.
|
||||
/b?n/?at #/bin/cat
|
||||
/etc/pa*wd #/etc/passwd
|
||||
# '*' serves as a "wild card" for filename expansion.
|
||||
/b?n/?at #/bin/cat
|
||||
|
||||
# '?' serves as a single-character "wild card" for filename expansion.
|
||||
/etc/pa*wd #/etc/passwd
|
||||
|
||||
# ‘[]’ serves to match the character from a range.
|
||||
ls -l [a-z]* #list all files with alphabet in its filename.
|
||||
|
||||
# ‘{}’ can be used to match filenames with more than one patterns
|
||||
ls {*.sh,*.py} #list all .sh and .py files
|
||||
```
|
||||
|
||||
##### Some handy environment variables
|
||||
|
|
Loading…
Add table
Reference in a new issue