r4076 - in branches/testing/BOOK: chapter01 chapter06

Bruce Dubbs bdubbs at swbell.net
Thu Sep 2 00:36:04 PDT 2004


M.Canales.es wrote:

>El Jue 02 Sep 2004 01:44 Gerard Beekmans escrbió:
>
>  
>
>>On Tue, 2004-08-31 at 15:29, M.Canales.es wrote:
>>    
>>
>>>This sed expresion is very very long. For PDF output it should be reduced up
>>>to 60 chars max. If this isn't possible, then a patch should be created.
>>>      
>>>
>>We can use the \ shell character to break up long lines. I'll see if
>>that works.
>>    
>>
>
>True for command lines, but not for sed expresions, i.e. the 's%...%...%g' has 
>75 chars. 
>

How about something like:

search='long string to search for"
sed -i -e "s%$search%replacement string%g"

If necessary, a variable could be used for the replacement too.

It' s untested.

  -- Bruce





More information about the lfs-book mailing list