Re: I need a better way to loop in the shell...

2005-12-14 Thread freebsd-questions
On 14 dec 2005, at 05:44, user wrote: I always do loops in /bin/sh like this: for f in `cat file` ; do rm -rf $f ; done Easy. I like doing it like this. The problem is, when I am dealing with an input list that has multiple words per line, this chops it up and treats every word as a new

Re: I need a better way to loop in the shell...

2005-12-13 Thread Björn König
Hello user, This worked for me: xargs -I% rm % < file Björn ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: I need a better way to loop in the shell...

2005-12-13 Thread Norberto Meijome
user wrote: I always do loops in /bin/sh like this: for f in `cat file` ; do rm -rf $f ; done Easy. I like doing it like this. The problem is, when I am dealing with an input list that has multiple words per line, this chops it up and treats every word as a new line... For instance, lets say

Re: I need a better way to loop in the shell...

2005-12-13 Thread Robert Eckardt
On Tue, 13 Dec 2005 23:44:42 -0500 (EST), user wrote > I always do loops in /bin/sh like this: > > for f in `cat file` ; do rm -rf $f ; done Hi, try instead: cat file | while read f ; do rm -f "$f" ; done In your command `file' is presented as 10,000 Maniacs MTV Unplugged - 01 - These Are Days

I need a better way to loop in the shell...

2005-12-13 Thread user
I always do loops in /bin/sh like this: for f in `cat file` ; do rm -rf $f ; done Easy. I like doing it like this. The problem is, when I am dealing with an input list that has multiple words per line, this chops it up and treats every word as a new line... For instance, lets say I have a fil