December 2018
Beginner
452 pages
12h 17m
English
As powerful as globbing is, this is also what makes it dangerous. For that reason, you might want to take drastic measures and turn globbing off. While this is possible, we have not seen it in practice. However, for some work or scripts, turning off globbing might be a good safeguard.
Using the set command, we can, as the man page states, change the value of a shell option. In this case, using -f will turn off globbing, as we can see when we try to repeat our previous example:
reader@ubuntu:/tmp$ cat p?ngpingpongreader@ubuntu:/tmp$ set -freader@ubuntu:/tmp$ cat p?ngcat: 'p?ng': No such file or directoryreader@ubuntu:/tmp$ set +freader@ubuntu:/tmp$ cat p?ngpingpong
Options are turned off by prefixing a ...