sed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need to change delimiter


From: uzibalqa
Subject: Need to change delimiter
Date: Mon, 27 Mar 2023 19:31:36 +0000

I am using the following sed command where ${blu} and ${wht} are Colour Escape 
Sequences
returned by tput.  

Sed has been returning 

    sed: -e expression #1, char 28: unknown option to `s'

when using "s/$fnp/${blu} /p", so I had to resort to "%" as delimiter.
I find this strange because Colour Escape Sequences should not have any
conflicting uses of "/".


    km_ere="^[[:blank:]]*(##|;;|!!|//|@c)[[:blank:]]+"
    fnp="${km_ere}FN[[:blank:]]+" ; dsp="${km_ere}DS[[:blank:]]+"

    sed -n -E -e "s%$fnp%${blu} %p" -e "s%$dsp%${wht} %p" "$flnm"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]