Unix pipes and positional arguments Unix pipes and positional arguments unix unix

Unix pipes and positional arguments


Many Unix command-line utilities use "-" as a shorthand to mean "don't use a real file here, use stdin (or stdout) instead". Sox is one of these programs:

This is from the sox manpage

SoX can be used in simple pipeline operations by using the special filename '-' which, if used in place of an input filename, will cause SoX will read audio data from 'standard input' (stdin), and which, if used in place of the output filename, will cause SoX will send audio data to 'standard output' (stdout). Note that when using this option, the file-type (see -t below) must also be given.


By convention, unix and friends use - to represent stdin and stdout.

It's not 100% universal, but it's a pretty widely used.


In your example, it's the same thing as

/dev/stdin

Try to replace your - with it, you will see.