Echoing Output
One of the first commands a rookie UNIX wizard learns is the echo command. It is a simple program that places the input parameters from the command line on stdout. It's easy enough for anyone to wrap his mind around. The echo command can be used in a pipeline to present input to a utility (as seen in the next example). In scripts, the echo command can be used for prompt display duty, as well as producing standard script output.
The following example uses the echo command to produce the input command stream to the ex editor. The following script uses ex to search for any lines in the file containing a ?. All such lines are deleted when found. This eliminates all processes that are not associated with a terminal (the TTY column contains ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access