Yes, that is pretty much how you do it.
You can use a semicolon or a new line instead of & &, since you want to get out of whether or not echo was successful (although I'm not sure what would happen).
Shell programming means using a large number of small commands (some built-in commands, some tiny programs) that do well and combine them with file redirection, code output logic, and other glue.
It may seem strange if you are used to languages ββwhere everything is done using functions or methods, but you get used to it.
bonkydog Oct 23 '11 at 20:14 2011-10-23 20:14
source share