You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Bowen Zhang (JIRA)" <ji...@apache.org> on 2013/10/11 23:00:44 UTC

[jira] [Commented] (OOZIE-1572) oozie shell action fails with shell script that starts with "#"

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

Bowen Zhang commented on OOZIE-1572:
------------------------------------

I think the issue is that oozie thinks the first line "#!/bin/bash" is a comment, so it can't recognize the shell command in the for loop, causing the error.

> oozie shell action fails with shell script that starts with "#"
> ---------------------------------------------------------------
>
>                 Key: OOZIE-1572
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1572
>             Project: Oozie
>          Issue Type: Bug
>            Reporter: Bowen Zhang
>
> The following is the shells script:
> #!/bin/bash
> ls -l | wc -l
> echo Hello
> x=10
> for i in `seq 1 $x`; do
>   echo $i
> Done
> And workflow.xml is the following:
> <workflow-app name="davetest" xmlns="uri:oozie:workflow:0.2">
>     <start to="dddd"/>
>     <action name="dddd">
>         <shell xmlns="uri:oozie:shell-action:0.1">
>             <job-tracker>${jobTracker}</job-tracker>
>             <name-node>${nameNode}</name-node>
>             <exec>/tmp/dave22.sh</exec>
>             <file>/tmp/dave22.sh#dave22.sh</file>
>         </shell>
>         <ok to="end"/>
>         <error to="kill"/>
>     </action>
>     <kill name="kill">
>         <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
>     </kill>
>     <end name="end"/>
> </workflow-app>



--
This message was sent by Atlassian JIRA
(v6.1#6144)