search/replace

I have a bunch of files that all end in
*.sql*
I need to replace all of the ";" with " ".
I have a little script called sr.cgi but it only works one file at a time.  Can anyone tell me a quick command line way to do this?
asagoAsked:
Who is Participating?
 
mikegrbCommented:
perl -i -ne 's/;/ /g; print;' *.sql

That should do it... if not let me know of any errors or some such that you get and I will fix it up :)
0
 
n0thingCommented:
Do you have perl on your system ??
0
 
mikegrbCommented:
you should also be able to accomplish what it appears you desire with sed
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
asagoAuthor Commented:
I have access to both.
0
 
ozoCommented:
What command line are you now using?
0
 
ozoCommented:
 or
perl -i -pe 'tr/;/ /' *.sql*
0
 
mikegrbCommented:
Yes, tr/// would be faster and I guess print isn't required

. /me consults docs ...

yes print isn't required as ozo the master of all things technologically related has pointed out (note this *IS* a complement meant to be taken positivley :)
0
 
asagoAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.