![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| awk Shell Script error : "Syntax Error : `Split' unexpected | Herry | UNIX for Dummies Questions & Answers | 2 | 03-17-2008 11:16 AM |
| error during run: St9bad_alloc - Getting this error while using some conversion progr | sathu_pec | Shell Programming and Scripting | 1 | 01-21-2008 02:38 AM |
| I got error like...syntax error on line 1, teletype | koti_rama | UNIX for Advanced & Expert Users | 2 | 07-07-2007 08:35 PM |
| error reading sections error at install | doelman | SUN Solaris | 2 | 02-05-2007 12:21 PM |
| Error: Internal system error: Unable to initialize standard output file | firkus | UNIX for Dummies Questions & Answers | 2 | 10-25-2005 04:23 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
sed error
in a bash shell I have the following
S00="BLOCK-NAMES /ELM1 /SAUT0 /FIT00 FOR ELMT,SAMPLE,FIT" S01="BLOCK-NAMES /ELM1 /SAUT0 /FIT01 FOR ELMT,SAMPLE,FIT" sed "s/'$S00'/'$S00'/g" pb206.cnt > tmp sed commplains and says sed: -e expression #1, char 29: Unknown option to `s' Can anybody help? Thank you!!! |
|
||||
|
You are replacing a string with the same string, so it's quite possible that it's replacing it, but there is no way to tell.
What exactly would you expect the result to be like? |
|
||||
|
of course the strings are different:
here is the script S00="BLOCK-NAMES /ELM1 /SAUT0 /FIT00" S01="BLOCK-NAMES /ELM1 /SAUT0 /FIT01" S02="BLOCK-NAMES /ELM1 /SAUT0 /FIT02" S03="BLOCK-NAMES /ELM1 /SAUT0 /FIT03" sed 's/$S00/$S01/g' pb206.cnt > tmp1 sed 's/$S00/$S02/g' pb206.cnt > tmp2 sed 's/$S00/$S03/g' pb206.cnt > tmp3 but tmp1, tmp2 and tmp3 are the same as pb206.cnt (which contains S00) |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|