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:
apart from not being generalisable to all shells, `Y <<< X` seems nicer to me than `echo X | Y`, e.g.
<<< lol cat;
it reads easier, you type less, and it also looks cool
There are 7 alternatives - vote for the best!
Don't do this:
echo word | command
Using a bash "here strings" and "here documents" look leeter than piping echo into the command. Also prevents subshell execution. Word is also expanded as usual.
If you can do better, submit your command here.
You must be signed in to comment.