Forum

General discussion on using the Kognitio Analytical Platform.
Contributor
Offline
User avatar
Posts: 386
Joined: Thu May 23, 2013 4:48 pm

How to have embedded quotes in a wxtool command

by markc » Mon Jul 21, 2014 11:37 am

I want to run a command on all database nodes using wxtool.

I know that I do something like the following for this:
wxtool -a '{can DB}' -S "my command text goes here"
However, my command has double quotes in, so how can I handle that?
Reply with quote Top
Contributor
Offline
User avatar
Posts: 386
Joined: Thu May 23, 2013 4:48 pm

Re: How to have embedded quotes in a wxtool command

by markc » Mon Jul 21, 2014 11:38 am

You can use double and single quotes embedded in a command. In the example below, the whole command is enclosed in double quotes, so embedded single quotes within the command are fine. Embedded double quotes are escaped with the '\' character:
wxtool -a '{can DB}' -S " ps -ef | grep \"netcat -lp 2000\" | grep -v grep | gawk '{print \$2}' "
Reply with quote Top

Who is online

Users browsing this forum: No registered users and 1 guest

cron