标签:one lse echo color remove txt rem for clean
#!/bin/bash cleanFile() { for i in $(ls $1); do if [[ $i == "kafka" ]]; then return elif [[ $i == "zk" ]]; then return fi if [[ -d ${i} ]]; then ch="${1}/${i}" cd ${ch} cleanFile ${ch} cd .. else #echo "${1}/${i}" if [[ ${i} =~ ".out" ]]; then echo "remove ${i}" rm -rf "${1}/${i}" elif [[ ${i} =~ ".log" ]]; then echo "remove ${i}" rm -rf "${1}/${i}" elif [[ ${i} =~ ".txt" ]]; then echo "remove ${i}" rm -rf "${1}/${i}" fi fi done }
标签:one lse echo color remove txt rem for clean
原文地址:https://www.cnblogs.com/shuiyonglewodezzzzz/p/10130744.html