Page 1 of 1

Passing Argument - Wrapper Stage

Posted: Tue Oct 21, 2014 7:37 am
by asyed
Hi,

I want to run an awk command from Wrapper stage. Something like

Code: Select all

awk -v x="~" -f #AwkScript# #InputFile# > #OutputFileName#
I have selected "Value Only" as Conversion in the properties while creating the wrapper stage. I have also tried with Conversion as "None"

However I am getting syntax error when I run the Job, calling this wrapper stage.
Wrapper printed bad property list: Expected "," or "}", got: "~", line 5, stdout text: {
wrapped,
kind = parallel,
usage = "testawk.op AwkScript InputFile OutputFileName"
command = "awk -v x="~" -f #AwkScript# #InputFile# > #OutputFileName# test.awk /home/user1/test.txt /home/user2/test_o.txt
status = {good = 0}
}
I have verified whether the value of the variables (#AwkScript#, #InputFile#, #OutputFileName#[/) are getting properly passed.

Looking at the error I tried to remove variables [ #AwkScript#, #InputFile# ,#OutputFileName# ] from command tab, so that it takes values so that proper command gets executed i.e.

Code: Select all

awk -v x="~" -f test.awk /home/user1/test.txt  > /home/user2/test_o.txt

but this time I get an error
Expected IO redirection, pipe, semicolon, or end, got : "["
What is the mistake that I am doing while sending arguments to Wrapper Stage?

Posted: Tue Oct 21, 2014 8:32 am
by asyed
Sorry for the confusion - bottomline is that I am unable to pass arguments to Wrapper Stage in desired format i.e.

Code: Select all

awk -v x="~" -f #AwkScript# #InputFile# > #OutputFileName#