This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Re: Execute Script input arguments messed up
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 27, 2009
03:11 PM
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
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
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 28, 2009
05:04 AM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 06, 2009
10:53 AM
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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 06, 2009
11:22 AM
Would it be possible for you to post your project (or a sample project which reproduces the issue?)
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)