sed error message: extra characters after the command.
I am a newbie. I got the following message:
sed -f xclt.sed file1.f > file2.f
sed: xclt.sed line 8: extra characters after command
My xclt.sed file is as follows:
/>>>START MAIN/,/>>>END MAIN/d
#/>>>START SUBSYSTEM/,/>>>END SUBSYSTEM/d
/>>>START IOFNC/,/>>>END IOFNC/d
/>>>START EXFNC/,/>>>END EXFNC/d
note: there is no error when I do the same job in unix system.
Could you please tell me a solution?
With best wishes.
Probably because of the hash sign `#' at the beginning of line 9?
from the sed info page:
Perhaps if you added a space after the octothorpe character on line 9.
I copied and pasted your xclt.sed file and tried it out on a sample file which included
#... more lines here.
The program removed this range of lines without errors for me.
You might try deleting and re-entering line 8 in your script, in case there is a hidden white-space character at the end of line in your xclt.sed script.
Thank you very much for your help. You are great!
The reason is :"You might try deleting and re-entering line 8 in your script, in case there is a hidden white-space character at the end of line in your xclt.sed script."
This "simple" miss wastes me too much time.
Thank you very much again.
|All times are GMT -5. The time now is 04:00 PM.|