cat pipe. Was: Sony audio (MSV), and LAME is lame
Ben Scott
dragonhawk at gmail.com
Thu Oct 4 10:21:20 EDT 2007
On 10/4/07, Steven W. Orr <steveo at syslang.net> wrote:
>> cat inputfile | lame -r -m m -b 24 -s 22.05 -- > output
>
> I see this all the time and for the life of me I just don't get it.
UUOC. http://partmaps.org/era/unix/award.html
> when they can just say
>
> lame < file
Even better, one can also do this:
< infile foo | bar | baz > outfile
to keep the pipeline in natural order.
I do sometimes wonder why, with all the other crap in bash, they
haven't just made it "optimize" calls like "cat file | something" to
"< file something".
Another related trick you can do in bash: You can include the
contents of any file at any point where you can do variable expansion.
For example, instead of
for i in $( xargs < argfile ) ; whatever ; done
... one can do ...
for i in $( < argfile ) ; whatever ; done
-- Ben
More information about the gnhlug-discuss
mailing list