[ 
https://issues.apache.org/jira/browse/FLUME-853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13153626#comment-13153626
 ] 

Will McQueen commented on FLUME-853:
------------------------------------

The behavior of shift depends on the shell. In the flume-ng script, the 
interpreter directive after the shebang /bin/sh. On my box, /bin/sh links to 
/bin/bash, and so what I see when I run 'flume-ng' without any args an error 
saying that there was an unspecified command, followed by the entire usage info.
     Error: Unknown or unspecified command ''
     <usage info is dispayed here>


 Other scripts such as 'flume' and 'flume-daemon.sh' from Flume OG require 
bash, as indicated by their interpreter directive "/usr/bin/env /bin/bash".

So, as an even simpler fix, how about in the flume-ng script we change this:
     #!/bin/sh
...to this:
     #!/usr/bin/env /bin/bash
                
> Running 
> --------
>
>                 Key: FLUME-853
>                 URL: https://issues.apache.org/jira/browse/FLUME-853
>             Project: Flume
>          Issue Type: Bug
>          Components: Shell
>    Affects Versions: NG alpha 1
>            Reporter: Jarek Jarcec Cecho
>            Priority: Trivial
>         Attachments: FLUME-853.patch
>
>
> Running flume-ng shell scripts without arguments will end up with following 
> error message:
> <21:53:24> jarcec@nermal flume-728 $ ./bin/flume-ng
> shift: 122: can't shift that many
> Would be nice to display help message instead in case when no parameters are 
> given on the command line.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to