bash - Send string to stdin -


is there way in bash:

/my/bash/script < echo 'this string sent stdin.' 

i'm aware pipe output echo such this:

echo 'this string piped stdin.' | /my/bash/script 

you can use one-line heredoc

cat <<< "this coming stdin" 

the above same as

cat <<eof coming stdin eof 

or can redirect output command, like

diff <(ls /bin) <(ls /usr/bin) 

or can read as

while read line    echo =$line= done < some_file 

or simply

echo | read param 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -