Sed: No Previous Regular Expression
This page answers questions like these:
- What is causing "sed: -e expression #1, char 0: no previous regular expression"?
Related Links:
Sed Cannot Rename Temporary File Permission Denied
Join Lines of Text File Together
Remove Characters From the End of a Large File
Remove Characters From the Start of a Large File
Replace Text in a File using the Command Line
sed: -e expression #1, char 0: no previous regular expression:
- After running a shell script or a sed command, you get the cryptic error above.
- The reason is you have a sed command which is trying to replace nothing with something, i.e. you have accidentally made the regexp empty. e.g. sed 's//XXX/' or sed "s/$FROM/XXX/" where $FROM is empty.
Related Links:
Sed Cannot Rename Temporary File Permission Denied
Join Lines of Text File Together
Remove Characters From the End of a Large File
Remove Characters From the Start of a Large File
Replace Text in a File using the Command Line
Home > Linux / Unix > Sed: No Previous Regular Expression
Tags: sed no previous regular expression, sed expression no previous regular expression, sed expression #1 char 0 no previous regular expression
Copyright © HelpDoco.com
sed-no-previous-regular-expression.txt
Linux-Unix/sed-expression-1-char-0-no-previous-regular-expression.htm
1