Let's develop the use of these one-liners a bit further, shall we?
Am 21. Oct, 2010 schwätzte Hunter Kreie so:You're correct, my loop has problems with files that have spaces in the
Although the for loop will probably work for your PHP files, I generally prefer using a different method for processing lists of files.
/bin/ls *.php | while read i ; do echo "text" >> $i ; done
This will handle files with spaces in them and gives you more flexibility with the input list. For instance, if you have a bunch of subdirectories, you could use find instead.
name.
Your loop is better for a standalone task like this.
# "The purpose of IT is to seamlessly and transparently provide the other
# 9/10's of the iceberg for people who need to work with chunks
# of floating ice." -- Strata Rose Chalup
---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss