issue with function or call to function
Hey Guys,
Here is my script and its output. Having issue with it. Any guidance would be much appreciated ! Code:
set -x Code:
sh-4.1$ !. Jim |
Is this supposed to be a shell function? Code:
create_blackout(${OEM_Blackout_Group},${calc_in_minutes},${Change_INC_Number}) 1) Put the definition before it is called, and write it like so: Code:
create_blackout() Code:
create_blackout $OEM_Blackout_Group $calc_in_minutes $Change_INC_Number first arg passed in is $1, second is $2, and so on. |
Yes it is a shell function. How can I call it and how to pass arguments while calling? As I would need the variables when i call and pass three parameters
can you guide me for that? |
It seems to be missing the first line to declare which script interpreter it needs. It could be this?
Code:
#!/bin/sh
|
Thank you very much all of you !! Issue is resolved.
|
Please remember to mark question as SOLVED.
I would add that there is entirely to little quoting used around variables and not sure why you needed both bc and python to perform a calculation, surely only one is needed. I was also curious which shell you are using as the use of 'set' for a variable is not a bashism and also why the use of export? |
All times are GMT -5. The time now is 04:43 PM. |