Print columns 1, 5 and then 2, put a colon, and then print column 10 of a line that matches pattern from the file columns.txt:
Protecting the special meaning of the single quotes and curly braces
I came across this situation when I was trying to
watch the above command as well as two other commands (say,
command2) at the same time. The correct way to do that is by properly protecting the meaning of the special characters in the above
N.B. The “
-d”flag highlights the changes, whereas the “
-n 20” flag causes the above to watch every 20 seconds.
Just for the heck of it, let me put the full command that I was actually using:
(suggestions for making the above shorter, other than by aliasing, are most welcome!).