From: gwtmp01@... Date: 2006-09-28T05:56:25+09:00 Subject: Re: how to determine if pipe is given On Sep 27, 2006, at 4:42 PM, ara.t.howard@noaa.gov wrote: > consider i have many, many programs which do things like > > convert infile outfile > convert - outfile # infile on stdin > convert infile - # outfile on stdout > convert - - # infile on stdin, outfile on stdout > convert --infiles=- # list of infiles on stdin, auto-name > outfiles While I understand the historical reason for such constructs, I much prefer: convert infile outfile convert /dev/stdin outfile # infile on stdin convert infile /dev/stdout # outfile on stdout convert # infile on stdin, outfile on stdout > convert --infiles=- # list of infiles on stdin, auto-name > outfiles Not sure about this last one. It certainly isn't all that common. You can get close to this via: cat filenames | xargs convert with maybe an option to convert to cause it to send output to auto- named outfiles: cat filenames | xargs convert --inplace I realize that some Unix systems don't support /dev/stdin, /dev/ stdout, though... Gary Wright