![]() |
I need a Find & Replace perl script
I need to change all my ARS codes on my server.
Any suggestion for a good perl script to do the job? |
you can do it with php
|
I can code something like this in php real fast ...
Also, if you have dreamweaver, it has a find and replace tool on it that will work on whole directories ... |
just use sed, much easier
|
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 |
bump :)
|
All times are GMT -7. The time now is 11:20 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123