September 12, 201213 yr 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
September 12, 201213 yr 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.
September 12, 201213 yr Hi David, Interested in this too. Let us all know if you end up with a test result. Regards, Lance
September 13, 201213 yr 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.
Create an account or sign in to comment