sed error: invalid reference

view story

http://www.unix.com – Hello all, I am using sed to parse a particular part of a string and am having problems. I am getting the following error: sed: -e expression #1, char 28: invalid reference \1 on `s' command's RHS Here is the code I am using: Code: echo "Alarm SET:" echo "" echo "Date:            " $DATE echo "Time:            " $TIME echo "ModelName:      " $MNAME TST=$(echo "$EVENTMSG" | sed -ne 's/.*odelName=(\w+[^.]+)/\1/p') echo "Non-FQDN Name:    &quo (HowTos)