How to pipe output to another command parameter?
Hi,
How do I render the output of one command to another. Example, calling a webservice to login: # wget localhost/login.php --post-string="userid=1&password=SECRET1" But now I want to change 'SECRET1' to output from another program like... # echo "SECRET2" | wget localhost/login.php --post-string="userid=1&password=SECRET1" Where I am trying to now call the webservice form the 'echo' commands output which is 'SECRET2' and not 'SECRET1'. |
Maybe:
wget localhost/login.php --post-string="userid=1&password=$(echo SECRET2)" |
Works perfect, thanks!
|
All times are GMT -5. The time now is 10:43 PM. |