Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 2 more questions



Tomas Gradin wrote:
:>Actually, my task was the following:
:>    cat $FILE | mv $FIELD1_IN_LINEX_OF_FILE $FIELD2_IN_LINEX_OF_FILE
:Ah, I see. I would do it like this:
:cat $FILE | awk '{print $1,$2}' | xargs -n 2 mv

cat?  What command is that :-)
There are few, if any, reasons to use cat with zsh.  I can't think of any at
the moment, unless you're using options to it.

awk < $FILE '{print $1,$2}' | xargs -n 2 mv

-- 
Geoff Wing [mason@xxxxxxxxxxxxxxx]   Technical Manager
  Phone    : +61-3-9818 2977         PrimeNet - Internet Consultancy
  Facsimile: +61-3-9819 3788         Web : <URL:http://www.primenet.com.au/>
  Mobile   : 0412 162 441



Messages sorted by: Reverse Date, Date, Thread, Author