0

This question already has an answer here:

I am asking if there is a way to automatically put the output of a command into the middle of another.

multimon-ng outputs: ZCZC-WXR-TOR-029037+0030-1051700-KEAX/NWS and i want that output to get sent to where i put three question marks : python2.7 easencode.py -z ??? output.wav

can i do this with pipe and if so, how?

marked as duplicate by muru, mosvy, dr01, Rui F Ribeiro, Jeff Schaller Jun 20 at 11:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

try

python2.7 easencode.py -z $(multimon-ng) output.wav

if you are in bash.

  • $( ) construct will execute command and insert result (stripped of end of line) in current command.

  • as per comment, you might whish to use "$( )" depending of expected result and importance of space.

  • 2
    I'd usually quote it "$(...)" – pLumo Jun 18 at 9:03
  • 3
    it's not about "the importance of space". if multimon-ng fails and doesn't print anything, then output.wav will be passed as argument to the -z option, resulting in a complete cock-up. – mosvy Jun 18 at 9:22
  • I was thinking about a more general use of $( ) construction. – Archemar Jun 18 at 10:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.