catcommand. For example, in nearly all cases,
cat file | command argcan be rewritten as
<file command arg. In a similar vein, this post is about the useless use of the
echocommand. In nearly all cases:
echo string | command argcan be rewritten using a heredoc:
command arg << END string ENDor, using a here-string:
command arg <<< stringNote: Here-strings are not portable (but most modern shells support them) so use the heredoc alternative shown above if you are writing a portable script!