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.