Thursday, January 16, 2014

How to push a string in to a command's stdin in Linux

It's a small trick but sometimes quite useful, e.g., you want to run a shell script without any interaction after you execute it.

You can push a string into your command like this:

$ command parameters <<< word