Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4514 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.