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

Re: 2 more questions (and a bug report)



On Feb 23,  3:39am, gwing@xxxxxxxxxxxxxxx wrote:
} Subject: Re: 2 more questions
}
} Tomas Gradin wrote:
} :cat $FILE | awk '{print $1,$2}' | xargs -n 2 mv
} 
} There are few, if any, reasons to use cat with zsh.
} 
} awk < $FILE '{print $1,$2}' | xargs -n 2 mv

There aren't all that many reasons to use awk and xargs, either.

	while read f1 f2 ; do mv $f1 $f2 ; done < $FILE

You should even be able to say

	while read f1 f2; { mv $f1 $f2 } < $FILE

but the `while LIST { LIST }` syntax appears to have been broken in various
different ways since 3.0-pre2 or earlier.  Has this been deprecated while I
wasn't looking, and just never removed from the info file?

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern



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