The 'cut' error is because it's missing a space on line 46. Change:
Code:
sed 's/\[error\]/\`/' | cut -d\` -f2 | cut -d\ -f4- | \
to
Code:
sed 's/\[error\]/\`/' | cut -d\` -f2 | cut -d\ -f4- | \
(i.e. two spaces after the backslash on the second 'cut', not one)
Still working on the others, I'm afraid...
EDIT: AHA! Yeah, the thing that's messing the other bit up is the fact they've put a newline in the 'screen' variable. Just put it all on one line. From:
Code:
screen="(File does not exist|Invalid error redirect|premature EOF|Premature end of
script|script not found)"
to
Code:
screen="(File does not exist|Invalid error redirect|premature EOF|Premature end of script|script not found)"
It's a nice script, by the way