commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Sometimes you want to write the script output to stdout but you need to send it to email.
If you use:
var="$( ls / )";
echo -e "$var";
works but, you need to wait the script terminate to bufferize then print the output var;
With this way, you can use/work/print the output before the variable receive all the output content, then after it you can use the variable for anything else, like send email.
There is 1 alternative - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.