Operating System - HP-UX
1826363 Members
4132 Online
109692 Solutions
New Discussion

How to "sed" binary files

 
Pepe Jimenez Muñoz
Frequent Advisor

How to "sed" binary files

Hi,

I want to do something like this:

sed -e s/text1/text2/ binary_file > binary_file.p

In Linux this work fine but don??t run in HP-UX 10.20; the sed command is only for text files !!! .

Thanks.
ppviso
1 REPLY 1
harry d brown jr
Honored Contributor

Re: How to "sed" binary files

You are right, on standard unix, sed is only for text files. As much as I like Linux, I have to constantly remind myself that what works there might not work elsewhere.

I suggest you use perl, which will allow you to do what you wish.

live free or die
harry
Live Free or Die