Unix Programming - sed again

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > August 2005 > sed again





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author sed again
Bob

2005-08-23, 2:48 am

What if I have a more complex sed that has ' in it how can I put the sed
into a bourne script becuase ' means something different in a bourne script?


Pascal Bourguignon

2005-08-23, 2:48 am

"Bob" <bob_then@yahoo.com.au> writes:
> What if I have a more complex sed that has ' in it how can I put the sed
> into a bourne script becuase ' means something different in a bourne script?


Using an escape or a double-quote:

[pjb@thalassa tmp]$ cat test
Testy, isn't it.
Testo
It's Testy.
Testa
[pjb@thalassa tmp]$ sed -e /'/s/Test/Grump/ < test
Grumpy, isn't it.
Testo
It's Grumpy.
Testa
[pjb@thalassa tmp]$ sed -e "/'/s/Test/Grump/" < test
Grumpy, isn't it.
Testo
It's Grumpy.
Testa

--
__Pascal Bourguignon__ http://www.informatimago.com/
Kitty like plastic.
Confuses for litter box.
Don't leave tarp around.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com