I see no one has tried to help... This works:
for i in `cat $temp`; do avoiding $list altogether... HTH, Pierre Vincent Danen wrote: > > I need a little help with something. I'm not used to writing scripts > in zsh, but I'm modifying a lengthy script already written in zsh and > am stuck with something. In bash and perl, I don't get this problem. > > I'm doing this: > > temp=`mktemp /tmp/filelistXXXXXX` > for i in 7.1 7.2 8.0 ppc/8.0 8.1 ia64/8.1 1.0.1 snf7.2 SRPMS; do > [[ -d $DEST/$i ]] && ls -1 $DEST/$i/*.rpm >>$temp > done > > list=`cat $temp` > rm -rf $temp > > for i in $list; do > > The problem is, the first instance of $i contains everything in > $list. In bash, it takes the first file that ls returns. In perl, I > would use chop($list); but there doesn't seem to be something > equivalent for zsh that I can see quickly. > > Basically, I want every file listed in $temp to be read as a single > instance in my for loop, but it's reading the *entire* file as the > first instance, which is incorrect. > > Any ideas? Thanks. > > -- > MandrakeSoft Security, OpenPGP key available on www.keyserver.net > 1024D/FE6F2AFD 88D8 0D23 8D4B 3407 5BD7 66F9 2043 D0E5 FE6F 2AFD > > Current Linux kernel 2.4.8-34.1mdk uptime: 14 days 6 hours 55 minutes. > > -------------------------------------------------------------------------------- > Part 1.2Type: application/pgp-signature
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
