cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rfirtion
Level 3

Execute Script input arguments messed up

I'm running IA 2008 VP 1 on linux and passing input arguments gotten from an HTML script to the Execute Script/Batch file Action. The input argument is the subnet value. When I look at the file afterwards, there is a rectangle in front of the subnet value. If the subnet is 24, then the resulting string is: 172.X24.101.200, where X is a rectangle.

The file I'm trying to put the input argument contains:
172.xx.101.200

The script does:

subnet=$3
sed "/xx.101/s//$subnet.101/" ifcfg-bond0 > out
mv -f out ifcfg-bond0

This works fine when run from the command line. It appears that IA is modifying the input argument? dos2unix on the file does not fix it.

Thanks,
Renee
Labels (1)
0 Kudos
(3) Replies
pv7721
Level 20

Well for IA everything between $ is considered to be an IA variable... It is very likely that IA replaces everything between the $ on the 1st line and the one on the second line. You may try to write them $DOLLAR$ in order to see if they're substituted when the script is run.
0 Kudos
rfirtion
Level 3

That isn't it. The script is on the Linux machine and I'm just passing the IA variables to it via:

sh myscript.sh $IAvar1$ $IAvar2$ $IAvar3$

Once in the script, all input variables have a rectangle before the value. If you put $1$ in the script it just adds a "$" after the variables value.
0 Kudos
pv7721
Level 20

Would it be possible for you to post your project (or a sample project which reproduces the issue?)
0 Kudos