#!/bin/bash root_path=$(dirname $(cd $(dirname $0); pwd)) clusters=( b2a4 b2b1 b2b5 b2b12 b9b9 ) for cluster in ${clusters[*]}; do cd ${root_path}/config/${cluster} echo Upload config ${cluster} tar_path=/tmp/${cluster}.tar.gz tar -czvf ${tar_path} * ytp-transfer ${tar_path} rm -rf ${tar_path} done