Escaping Characters

Discussion, questions and support.
Post Reply
JGM22
Posts: 84
Joined: May 1st, ’15, 15:23

Post by JGM22 » Nov 27th, ’15, 23:36

Is there a way to escape => '{print $NF}'

Here is the full command... ls -l /usr/openv/netbackup/db/images | grep -i %INPUT_CLIENT% | awk '{print $NF}'{Enter}

When I run the command, here is the output... It ignores => {print $NF}

ls -l /usr/openv/netbackup/db/images | grep -i george | awk ''

Thx...JGM
User avatar
Tom
Posts: 796
Joined: Nov 24th, ’15, 23:39

Post by Tom » Nov 28th, ’15, 12:01

Characters such as {}^!+# have special meaning, enclose them in braces. For example {^}{!}{{}. In your case:

Code: Select all

ls -l /usr/openv/netbackup/db/images | grep -i %INPUT_CLIENT% | awk '`{{}print $NF`{}}'{Enter}
JGM22
Posts: 84
Joined: May 1st, ’15, 15:23

Post by JGM22 » Nov 30th, ’15, 13:42

Thx Tom, much appreciated...JGM
JGM22
Posts: 84
Joined: May 1st, ’15, 15:23

Post by JGM22 » Dec 8th, ’15, 18:17

In the help guide I was reading on Text Expander and could not find a complete reference to all of the special characters that need to be escaped, is there a KB article I can reference?

The reason I am asking is because I wrote a script and apparently pipe -> | <- needs to be escaped.

Instead of testing every special character to see if it needs to be escaped it would be helpful to reference a document.

Thank you,

JGM
Post Reply