How to escape from the shell

In a Script I need to push several messages to a function.
My problem here is: I have to print the string v$LOCK on the resulting line which spits out the message. What I want here is not printing the contents of $LOCK I want to escape the shell and printout v$LOCK on the line. But don't know how to.

#!/bin/sh
AWK="/bin/awk"
RESULT="30"
DBPKG="vserver56"

message() {
${AWK} -F## '{system("echo \"" $1 "\" hostname='$DBPKG' severity=" $2 " sub_origin=\""$3"\" script=\"'$SCRIPT'\" \"" $4 "\" SENTRY")}'
}

echo "There is a session locking since $RESULT minutes. See v$LOCK!##CRITICAL##$METAGONIS_APPLICATION##GE_RPM_blocking_waits" | message

Spits out:
There is a session locking since 30 minutes. See v! hostname=vserver56 severity=CRITICAL sub_origin= script= GE_RPM_blocking_waits SENTRY

But should Spit out:
There is a session locking since 30 minutes. See v$LOCK! hostname=vserver56 severity=CRITICAL sub_origin= script= GE_RPM_blocking_waits SENTRY

Just build your entire string within awk and output using print or printf.

just put '\' before the variable

echo "There is a session locking since $RESULT minutes. See v\$LOCK!##CRITICAL##$METAGONIS_APPLICATION##GE_RPM_blocking_waits" | message

BR

Hello User fpmurphy, I redefined the complete AWK block.
And now it works as you suggested.

message() {
${AWK} -F## '{system("echo \"" "There is a session locking since '$RESULT' minutes. See v\$LOCK!" "\" hostname='$DBPKG' severity=" $2 " sub_origin=\""$3"\" script=\"'$SCRIPT'\" \"" $4 "\" SENTRY")}'
}

Thanks a lot for your solution.

brgds from

sdohn