Operating System - HP-UX
1827983 Members
2260 Online
109973 Solutions
New Discussion

Need SED Equiv to this perl command

 
rmueller58
Valued Contributor

Need SED Equiv to this perl command

perl -pi -e s/"Millard\,Public\,Schools"/"Millard Public Schools"/g

3 REPLIES 3
rmueller58
Valued Contributor

Re: Need SED Equiv to this perl command

Disregard - Found the solution.
James R. Ferguson
Acclaimed Contributor

Re: Need SED Equiv to this perl command

Hi Rex:

In HP-UX using its standard 'sed' you need a two-step process:

# sed -e 's/"Millard,Public,Schools"/"Millard Public Schools"/g' file > file.new
# mv file.new file

If you were to use GNU 'sed' the '-i' switch for inplace updates is supported and could be added to act like Perl.

In eithere Perl or sed, there is no need to escape the comma character.

Regards!

...JRF...


rmueller58
Valued Contributor

Re: Need SED Equiv to this perl command

Thanks James..