Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> escaping comments for shell commands


Copy link to this message
-
Re: escaping comments for shell commands
For anyone else hitting this, the workaround is put your -- inside a quoted
string, which keeps the parser from thinking it's a comment.

Something like:

sh /bin/bash -c 'ls --PigWillNotMakeThisAComment'

On Wed, Jul 31, 2013 at 7:28 PM, Russell Jurney <[EMAIL PROTECTED]>wrote:

> I think its a bug that they work when not at the beginning of a line.
>
>
> On Wed, Jul 31, 2013 at 3:51 PM, Doug Daniels <[EMAIL PROTECTED]
> >wrote:
>
> > Does anyone know if it's possible to escape -- style comments?  I'd like
> to
> > pass some arguments to a command I'm running with 'sh', but they're being
> > interpreted as comments and truncating the command.
> >
> > Here's an example:
> >
> > sh ls --PigIgnoresThisBecauseItThinksItIsAComment /foo
> >
> > Thanks,
> > Doug
> >
>
>
>
> --
> Russell Jurney twitter.com/rjurney [EMAIL PROTECTED]
> datasyndrome.com
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB