kevin wrote:
> I am looking for a quick script to alter a load of .php files in a directory
> and its subdirectories. I just want to swap one line in each file with a new
> line. Anyone help?
find /dir -name "*.php" |
while read filename; do
sed 's/old line/new line/' >newfile.$$ <$filename && mv
newfile.$$ $filename
done
--
Pádraig Brady - http://www.pixelbeat.org
--- Following generated by rotagator ---
New Linux networking commands
ifconfig, route, mii-tool etc. are out of date
The new kids on the block are ip and ethtool.
ip link show #list interfaces
ethtool interface #list interface status
ip link set dev eth0 name home #rename eth0 to home
ip addr add 1.2.3.4/24 brd + dev eth0 #add ip and mask(255.255.255.0)
ip link set dev interface up #bring interface up (or down)
ip route add default via 1.2.3.254 #set default route to 1.2.3.254
--
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!