For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > August 2006 > sed









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
a.abdulwahab@gmail.com

2006-08-24, 7:01 pm

Hello,

I am writing a shell script, (kshell), and I am using sed.

sed '_<head></head>_<head>Something</head>_' > $file

This works fine, and it replaces the text. The problem is that I want
to insert a java script , but its a big chunk, and the method above
doesnt work when it exceeds one line. It gives me "unterminated
command" , but I explicitly checked the separators, and the single
quotes. Any small example on how to use sed for big paragraphs. I'd
also appreciate an example on how to use sed to insert/append strings.

Thanks.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com