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 ?
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)
touch <(echo "test.txt")