shell 自动map和unmap 应用实例url域名【初级版】

#!/bin/bash
#a="one,two,three,four"
a=$(cf a|grep started |grep $1|tr -s ' '|cut -d ' ' -f 6-|cut -d ',' -f 1-)
OLD_IFS="$IFS"
IFS=","
arr=($a)
IFS="$OLD_IFS"

for s in ${arr[@]}
do
  echo "$s"
cf map-route $2  $(echo "$s"|cut -d '.' -f 2-) -n $(echo "$s"|cut -d '.' -f 1)

done
原文地址:https://www.cnblogs.com/husbandmen/p/7835092.html