mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-12-23 00:36:35 +00:00
add more bash globbing examples
This commit is contained in:
parent
1f64f38cc5
commit
c64c6fbf50
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…
Reference in New Issue
Block a user