June 2017
Beginner
502 pages
11h 26m
English
The semicolon is a command separator, and it allows us to chain one command after the other, just as we did for the if construct. For instance, look at this:
zarrelli:~$ echo TEST > test.txt ; cat test.txtTEST
We created a test.txt file, and we cat its content right after it. Be careful with the find -exec command, as the semicolon must be escaped. The -exec option allows us to perform a command on the files provided by find:
zarrelli:~$ echo TEST > test_1.txt ; ls test_1.txt ; find -name test_1.txt -exec rm {} \; ; lstest_1.txt* 1 2 3 comment.sh test.txt
With the find -exec object, the semicolon is the command sequence terminator and not a command separator, so it must be escaped in order to avoid the shell to ...
Read now
Unlock full access