Quote:
|
Originally Posted by cursive
Hi,
Abou the code : sed -n "/^[^)]*([^)]*$/,/^[^(]*)[^(]*/p" file
the system prompt error message, "Illegal variable name"
I am not sure whether I missing something here, could someone
show me the right path ?
Thanks in advance,
cursive
|
Try using single quotes
Code:
$ cat file
statement statement statement
statement statement statement
statement statement statement
Today( "here"
MONDAY = map( "monday")
TUESDAY = map( "tuesday" )
WESNESDAY = map( "wednesday" )
THURSDAY = map( "thursday" )
FRIDAY = map( "friday" )
SATURDAY = map( "saturday" )
SUNDAY = map( "sunday" )
);
statement statement statement
statement statement statement
statement statement statement
$ sed -n '/^[^)]*([^)]*$/,/^[^(]*)[^(]*/p' file
Today( "here"
MONDAY = map( "monday")
TUESDAY = map( "tuesday" )
WESNESDAY = map( "wednesday" )
THURSDAY = map( "thursday" )
FRIDAY = map( "friday" )
SATURDAY = map( "saturday" )
SUNDAY = map( "sunday" )
);