Script arguments for flags?

tkessler
New Contributor II

I have a script that identifies arguments by flags using case-switch logic instead of position, ignoring irrelevant flags. I'm assuming when provisioning this script in JAMF, that I would just set parameter 4 to the first flag, followed by its value as parameter 5, and so on. However, my script takes up to 5 relevant tag/value pairs, which is 10 parameter spaces but JAMF only seems to support 8. Is there a way to do add more parameter fields?

2 REPLIES 2

tlarkin
Honored Contributor

The JAMF framework reserves the first few positional parameters for certain things.

$1 is reserved for the mount point of the boot volume

$2 is reserved for the Computer Name

$3 is reserved for the current user that is logged in

Here is the KB article on it:

kbase article

Here is a feature request that asks exactly what you want, so please go up-vote it:

feature request link

What exactly are you looking to do with more positional parameters? There may be an alternative workflow that might do what you want?

Cheers
Tom

tkessler
New Contributor II

There are, but its just a matter of accommodating an existing script's syntax, and not having to re-write it for the sake of putting into Casper. I'd like to just drop the code in, provide relevant input, and have it run. This is especially convenient for developing and updating the script in an environment separate from Casper, and then be able to just replace the script in Casper and have it work.