Skip to content

Instantly share code, notes, and snippets.

@haircut
haircut / bash-multiple-jamf-policies.sh
Last active December 28, 2020 16:09
Running multiple Jamf policies in bash or python; minimal examples
#!/bin/bash
# Policy IDs or custom trigger names
# Bash arrays are specified like the provided example; surround custom triggers with
# quotes, and leave policy ids as "bare" integers
POLICIES=( "custom" "triggers" 523 32 )
for i in "${POLICIES[@]}"; do
# test if array element is an integer, ie. a policy id
if [ "$i" -eq "$i" ] 2>/dev/null