![]() |
shell (bash) script help
I am looking for a shell script (using SSH or telnet access) to mass overwrite files (using ./overwrite.sh ) on my server.
for example, I have 100 domains on my server, and each of my server has 10 sub folders under public_html . each sub folder has example.php file and they are having some wrong code.i want to edit the code with new code.. i want shell script should overwrite example.php with new code on all domains all sub folders.Any help here? |
smokey had something like this
|
#!/bin/bash
path="/htdocs/users/*/public_html/example.php" for a in `ls $path`; do perl -pi -e "s/OLDTEXT/NEWTEXT/goi" $a done you have to enter the right path.. cant exactly see how your folders / domains are structured .. should work. havent tested it :} |
thanks peace maker i will try.
|
no problem. if you need help. let me know.
|
Get in touch with me and I'll code it specifically for your needs.
|
All times are GMT -7. The time now is 12:44 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123