Script – find and replace

Posted by admin on Jun 18, 2009 in Scripts |

#########
#
#  change the same value in all files showen under ls in a directory
# good for mass IP changes
#
##########
#!/bin/bash
for i in $( ls );
do
sed -i ’s/find/replace/g’ $i
done

Tags: , ,

Reply

Copyright © 2012 BenMcGrail.com All rights reserved.
Hosted by: VitexOnline.com