A pipe in a Unix-like operating system is for running one program, taking its standard output (which would otherwise go to the screen) and using it as input to another program (in place of its standard input which would normally come from the keyboard).
It seems like what you want to do is have one program output to a file, and then have another program use the file as input. You don't need a pipe for that.
To run one program after another one finishes, all on one command line, use ;. For example:
sox /Users/someUser/Desktop/input.mp3 output.mp3 ; mutt -s "someSubject" -a output.mp3 some@recipient.com
Unix command line programs output an "exit status" or "return code". Most programs output 0 to indicate that they did their thing successfully, or some other value if there was a problem. If your first command is like this, use && in place of ; to only run the second command if the first one was successful. For example:
sox /Users/someUser/Desktop/input.mp3 output.mp3 && mutt -s "someSubject" -a output.mp3 some@recipient.com
sox /Users/someUser/Desktop/input.mp3 output.mp3 ; mutt -s "someSubject" -a output.mp3 some@recipient.comdo you? You want to send the command line output? – Daniel Beck May 17 '11 at 7:56soxcall writesoutput.mp3, why don't you just use that one like I suggested and delete it after sending? In case sending fails or something like that, you'll still have the file to try again. – Daniel Beck May 17 '11 at 8:09