I saw this usage of redirection somewhere, and thought it was a typo: grep root < /etc/passwd But after I run it, I saw that it gives the same output with grep root /etc/passwd: $ grep root ...
Given a command the output of which is being processed by, for example, grep I also want the actual output to be included in the log file for debugging purposes. For example if I have the following ...
I have a variable which contains multiline output of a command. What's the most effecient way to read the output line by line from the variable? For example: jobs="$(jobs)" if [ "$jobs" ]; then ...