View Single Post
Old Jan 17th, 2008, 10:26 PM   #6
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 754
Rep Power: 3 Jimbo is on a distinguished road
Re: Alter many files, all with same variable in them

You could also do it with sed, again assuming a *nix system or gnu tools installed. I'm rusty, but something along the lines of:
 for file in `ls`; 
do 
    sed -i "s/SELECT user_id, username,/SELECT id, nick,/g" $file; 
done
If you want a backup copy, use -i.bkup
__________________
<insert disclaimer here>
<insert shameless plug for Visual Studio here>
Jimbo is online now   Reply With Quote