David Jondreau Posted September 12, 2012 Posted September 12, 2012 It's great I can run run system-level scripts through FMS. There is an option to include parameters, but I've never used that. How would a shell script access those parameters? A quick look at Unix scripting makes me think that if I pass parameters as... ABC 321 "blue dog" ...then I can reference those parameters as $0 $1 and $2. so: echo "i like the $2" would return i like the blue dog Is that the correct method for handling system-level script parameters? Thanks, DJ
dansmith65 Posted September 12, 2012 Posted September 12, 2012 That sounds close to me - you should probably do a test to confirm, though. I think $0 might be the name of the script, and $1 is the first parameter.
lance123 Posted September 12, 2012 Posted September 12, 2012 Hi David, Interested in this too. Let us all know if you end up with a test result. Regards, Lance
Wim Decorte Posted September 13, 2012 Posted September 13, 2012 That's how it is done. Make sure to use quotes around parameter values that have spaces in them. On Windows I would use a VBscript rather than a batch file when I need to pass parameters. VBscript allows for more power in the code to work with the parameters (or arguments as they are called) - putting them in a nice array.
Recommended Posts
This topic is 4514 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now