December 2018
Beginner
452 pages
12h 17m
English
As stated, glob commands achieve a similar effect to regular expressions. There are some differences though. For example, the * character in regular expressions stood for zero or more occurrences of the preceding character. For globbing, it is a wildcard for any and all characters, more similar to the .* notation of regular expressions.
As with regular expressions, a glob pattern can consist of normal characters, combined with special characters. Take a look at an example where ls is used with different arguments/globbing patterns:
reader@ubuntu:~/scripts/chapter_09$ ls -ltotal 68-rw-rw-r-- 1 reader reader 682 Oct 2 18:31 empty-file.sh-rw-rw-r-- 1 reader reader 1183 Oct 1 19:06 file-create.sh-rw-rw-r-- ...