Pass it through sed?
$ for ... do cat `sed -e 's/ *#.*$//' >> largefile ; done
Alternatively, you could do this without 'for':
$ cat `cat filelist.txt | sed -e 's/ *#.*//'`
You can throw in any other separators into the sed statement, as well.
-Doug
benjamin stathos wrote:
It seems I spoke too soon. I should have been more explicit. The echo
$i was just an example, but not what I really wanted to do. Here's a
better demonstration.
for i in `cat filelist`; do cat $i >> largefile; done
The whitespace problem is now different. The offending line in $i is:
tempfile #Only need for comparison
The error is:
cat: tempfile #Only need for comparison: No such file or directory
So now I've lost the ability to have comments. :/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page