Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 2 more questions (and a bug report)
- X-seq: zsh-users 701
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: gwing@xxxxxxxxxxxxxxx, zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: 2 more questions (and a bug report)
- Date: Sat, 22 Feb 1997 10:29:26 -0800
- In-reply-to: gwing@xxxxxxxxxxxxxxx "Re: 2 more questions" (Feb 23, 3:39am)
- References: <19970222163944.5978.qmail@xxxxxxxxxxxxxxx>
- Reply-to: schaefer@xxxxxxx
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