Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Pipe alternative


    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 ?


  2. #2
    Linux Engineer Kieren's Avatar
    Join Date
    Aug 2007
    You can use subshell:

    For example to create a file using the result from echo:

    touch <(echo "test.txt")
    For more information see command_liners | An alternative to the pipe (in bash/ksh)
    Linux User #453176

  3. #3
    Yes I saw that, thanks.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts