Passing parameter with spaces to Execute Command Stage
Moderators: chulett, rschirm, roy
Passing parameter with spaces to Execute Command Stage
I am using an execute command stage passing some parameters
example: Overtime Reporting/Cubes
but my shell script is recognizing only Overtime instead of Overtime Reporting/Cubes value. Can any one help me on how to pass the parameters which has spaces in it?
example: Overtime Reporting/Cubes
but my shell script is recognizing only Overtime instead of Overtime Reporting/Cubes value. Can any one help me on how to pass the parameters which has spaces in it?
-
- Participant
- Posts: 62
- Joined: Thu Feb 08, 2007 6:01 am
- Location: Pune
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Hmm - that option http://www-304.ibm.com/support/docview. ... wg21386517 should only help if he was using single quotes, and earlier karry450 said he tried double quotes.
karry450, can you post the exact string you are passing the parameter?
karry450, can you post the exact string you are passing the parameter?
-
- Participant
- Posts: 62
- Joined: Thu Feb 08, 2007 6:01 am
- Location: Pune
I created a sequence (no environment variable used) with only execute command activity and passed the following command (under the command option) in it :-
echo "Overtime Reporting/Cubes"
Output --> "Overtime Reporting/Cubes"
Then,
Passed following under command option - echo
Passed following under parameter option - "Overtime Reporting/Cubes"
Output --> "Overtime Reporting/Cubes"
Can you try the above and let us know what you see in the director log?
It could be that the datastage is passing the value correctly, but the shell script is not acknowledging it.
echo "Overtime Reporting/Cubes"
Output --> "Overtime Reporting/Cubes"
Then,
Passed following under command option - echo
Passed following under parameter option - "Overtime Reporting/Cubes"
Output --> "Overtime Reporting/Cubes"
Can you try the above and let us know what you see in the director log?
It could be that the datastage is passing the value correctly, but the shell script is not acknowledging it.
We really need to get past "doesn't work" to what the actual problem is and where it is happening. As noted, let's start with showing us what actually gets logged when the job starts as all parameters in play are logged in one of the first messages.
After that, if it looks ok, would be to show us how you are calling the script (what is where in the EC stage) and then how it is being used in your shell script. And I'd also be curious what you need to do from the command line to make your script work? If that's one value then it absolutely needs to be quoted otherwise the space turns it into two parameters.
After that, if it looks ok, would be to show us how you are calling the script (what is where in the EC stage) and then how it is being used in your shell script. And I'd also be curious what you need to do from the command line to make your script work? If that's one value then it absolutely needs to be quoted otherwise the space turns it into two parameters.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers