It is currently Tue, 30 Nov 2021 17:59:37 GMT

Author Message
 : split lines in long 'sed'-pattern ?

Hello everybody,

I want 'sed' to search for a very long pattern that is exceeding
the usual 80 characters width.
I would like to split the patterns over several lines, so that my
code is more readable, but I don't find any continuation character.
I work with Bash and continuation characters like \ and " don't seem
to work. When I use \, I get no error, but the values are not
substituted by 'sed' !

An example of such a 'sed'-command is ( this doesn't work ! ) :

sed -e 's/[Nn][Aa][Mm][Ee]="TITEL"[     ]\+[Vv][Aa][Ll][Uu][Ee]\
="[^"]*"/NAME="TITEL" VALUE="'$TITEL'"/g;s/[Nn][Aa][Mm][Ee]\
="ASKLASSE"[     ]\+[Vv][Aa][Ll][Uu][Ee]="[^"]*"/NAME\
="ASKLASSE" VALUE="'$ASKLASSE'"/g' bangkok_input1.html >sed.html

Does anybody have any suggestions ?
With regards,

Wim Van Paepegem ------------------
University of Ghent, Belgium.

 Sat, 26 Aug 2000 03:00:00 GMT   
   [ 1 post ] 

Similar Threads

1. : Problem with 'sed' valid pattern

2. Line splitting long lines

3. sed 'Joining lines'?

4. xdm: xlogin*greeting lines won't split

5. sed: references? + multiple lines pattern spaces question

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software