Skip to content

Instantly share code, notes, and snippets.

@ethanmiller
Created July 8, 2011 15:55
Show Gist options
  • Save ethanmiller/1072132 to your computer and use it in GitHub Desktop.
Save ethanmiller/1072132 to your computer and use it in GitHub Desktop.
Rundeck looping over multi-value options
# This job has two options, action and binary.
# binary accepts multi-values, and the separator is ','
# the following is a script step that loops over the binary arguments
# commandline arguments are : ${option.action} ${option.binary}
ACT=$1
BLIST=$2
IFS=$','
for B in $BLIST; do
sudo $B $ACT
done
unset IFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment