Results 1 to 3 of 3
Hey,
I have some command, I'll call it "command".
I need to do this:
yes | command
but without a pipe, there is a reason for this, because for the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-02-2013 #1Just Joined!
- Join Date
- Feb 2013
- Posts
- 2
Pipe alternative
Hey,
I have some command, I'll call it "command".
I need to do this:
yes | command
but without a pipe, there is a reason for this, because for the specific use, pipe before the command
is not allowed, that's not the point.
Is there an alternative I can use which will output do the same thing without the pipe ?
Maybe something like this:
command < yes
(which will not work because it expects a file, and not a command)
?
Or some other simple way ?
Thanks
- 02-04-2013 #2
You can use subshell:
For example to create a file using the result from echo:
For more information see command_liners | An alternative to the pipe (in bash/ksh)Code:touch <(echo "test.txt")
Linux User #453176
- 02-12-2013 #3Just Joined!
- Join Date
- Feb 2013
- Posts
- 2
Yes I saw that, thanks.


Reply With Quote
