Skip to content

Instantly share code, notes, and snippets.

@davidphasson
Created October 21, 2010 23:05
Show Gist options
  • Save davidphasson/639561 to your computer and use it in GitHub Desktop.
Save davidphasson/639561 to your computer and use it in GitHub Desktop.
#!/usr/local/bin/bash
# Declare an array
declare -a locations
# Populate with locations
locations=( four_d enigma hardi adni woods edevel ccb ad altshuler asl collabs fmri shapetls spectrum mouse ois gsrs blackops eluders warp bearden poldrack )
# Set a date string for the snapshot names
date=`date +%y-%m-%d_%H-%M-%S`
echo ${#locations[@]} items
for item in $locations; do
path=/ifs/$item
if [ -d $path ]; then
echo isi snapshot create --name=${item}-daily-${date}= --path=${path}
else
echo $path is not an accessible directory
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment