You are not logged in.
Pages: 1
I have seen the obvious piping for things such as program | more etc. And some allow text to be piped into it, for example the TTS (text to speech) program Festival, You'd type in..
festival -tts | echo "I am going to be spoken"
But it doesn't work for any other progams.. What I want to do is for example
hexdump foo.txt INTO --> hexdump | echo "I am going into hexdump"
How do I pipe text into a program? Hexdump requires a file to be specified (foo.txt for example), so maybe I want it to see the echo as text. If I can't, then some programs use strings, so I could really use it for that!..
Offline
Your examples don't make any sense... a pipe takes the stdout of the first program and uses it as the stdin of the second. What you want to do is the opposite direction as far as I can tell, which would be < when working with files... when working with regular stdout you need to reverse the pipe order as Ghost1227 posted.
Offline
Some programs that require a filename will understand "-" to mean "read from stdin". Silly example:
echo hello world | cat -
In bash, you can use command substitution to make a fake file that is actually the output of your process. The filename looks like "<(command)". Silly example:
hexdump <(echo hello world)
Offline
Pages: 1