Hello ,

I am writing a script to add stuff to html pages en-masse.Its a ksh

I did this:

sed '_</head>_</head><script>test</script>_' > $file

and it works, it just replaces </head> with
</head><script>test</script> (which is just like inserting), but
whenever I try to insert a big chunck it gives me "unmatched command"
or unterminated, but I checked the single quotes, and the separators (i
use _ instead of / due to obvious reasons of html tags), and i checked,
in my script there are no single quotes that can mess up the single
quote matching.

Any example on how to do this but for multiple lines? I'd also
appreciate a small example on using sed to insert/append.