View Single Post
Old 03-13-2004, 06:55 PM  
Pun
Confirmed User
 
Join Date: Oct 2003
Location: Seattle
Posts: 379
You don't even need perl to do that, although it's certainly possible. I don't know exactly how your file structure is, so I don't know if this solution works for you, but it's how I'd do it.

----------------------
#!/bin/bash
for i in *
do
cat $i | sed 's/old_ars_code/new_ars_code/g' > .tmpabc123
mv .tmpabc123 $i
done
----------------------

That just goes through all files in a given directory and replaces "old_ars_code" with "new_ars_code".
Not perl, but it's probably just as fast (if not faster) and it's simple.

-Pun
__________________
TrafficHolder.com - Buy/Sell Adult Traffic
ICQ: 18771941
Pun is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote