From: Bob T <bo...@el...> - 2002-10-01 21:34:26
|
In spite of my personal distaste for "studlyCaps" convention, I'll offer this way to do it quick-like: To change all instance of cms_port to cms_bridge, in every file in the current directory and below: perl -pi -e 's?cms_port?cms_bridge?g' . To do the same thing, but finding files with grep that contain "doobee": perl -pi -e 's?cms_port?cms_bridge?g' `grep -lr doobee` Enjoy! |
From: Matthew M. <ma...@tu...> - 2002-10-03 17:51:29
|
Thanks for that tip. Read more about it here http://www.ctssn.com/linux/shellaccount.html BTW not crazy about the capitalization thing at first but I am getting used to it. > In spite of my personal distaste for "studlyCaps" convention, I'll offer > this way to do it quick-like: > > To change all instance of cms_port to cms_bridge, in every file in the > current directory and below: > > perl -pi -e 's?cms_port?cms_bridge?g' . > > > To do the same thing, but finding files with grep that contain "doobee": > perl -pi -e 's?cms_port?cms_bridge?g' `grep -lr doobee` > > > Enjoy! > > > > ------------------------------------------------------- > This sf.net email is sponsored by: DEDICATED SERVERS only $89! > Linux or FreeBSD, FREE setup, FAST network. Get your own server > today at http://www.ServePath.com/indexfm.htm > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 ICQ: 141057403 |
From: Matthew M. <ma...@tu...> - 2002-10-03 17:52:52
|
Oops lets try that link again http://www.ctssn.com/linux/perlReplacementScript.html > In spite of my personal distaste for "studlyCaps" convention, I'll offer > this way to do it quick-like: > > To change all instance of cms_port to cms_bridge, in every file in the > current directory and below: > > perl -pi -e 's?cms_port?cms_bridge?g' . > > > To do the same thing, but finding files with grep that contain "doobee": > perl -pi -e 's?cms_port?cms_bridge?g' `grep -lr doobee` > > > Enjoy! > > > > ------------------------------------------------------- > This sf.net email is sponsored by: DEDICATED SERVERS only $89! > Linux or FreeBSD, FREE setup, FAST network. Get your own server > today at http://www.ServePath.com/indexfm.htm > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers Matthew McNaney Internet Systems Architect Electronic Student Services Email: ma...@tu... URL: http://phpwebsite.appstate.edu Phone: 828-262-6493 ICQ: 141057403 |
From: Adam M. <ad...@tu...> - 2002-10-03 18:56:52
|
I used the first command with success today to do some replacements in the announcements module. Just wanted to let you all know it works :) Also there is no output to let you know what replacements it made so you have to trust in the force (or pass it a verbose switch). Adam > Oops lets try that link again > > http://www.ctssn.com/linux/perlReplacementScript.html > >> In spite of my personal distaste for "studlyCaps" convention, I'll >> offer this way to do it quick-like: >> >> To change all instance of cms_port to cms_bridge, in every file in the >> current directory and below: >> >> perl -pi -e 's?cms_port?cms_bridge?g' . >> >> >> To do the same thing, but finding files with grep that contain >> "doobee": >> perl -pi -e 's?cms_port?cms_bridge?g' `grep -lr doobee` >> >> >> Enjoy! >> >> >> >> ------------------------------------------------------- >> This sf.net email is sponsored by: DEDICATED SERVERS only $89! >> Linux or FreeBSD, FREE setup, FAST network. Get your own server >> today at http://www.ServePath.com/indexfm.htm >> _______________________________________________ >> Phpwebsite-developers mailing list >> Php...@li... >> https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > Matthew McNaney > Internet Systems Architect > Electronic Student Services > Email: ma...@tu... > URL: http://phpwebsite.appstate.edu > Phone: 828-262-6493 > ICQ: 141057403 > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers --------------------------------- Adam Morton Developer - Web Technology Group Appalachian State University http://phpwebsite.appstate.edu |