« [公告] 大家可继续放心使用 *.ipchina.org 域名 | Main | proftpd 1.3.0rc2 released »
July 24, 2005
shell 的一个 exclude 处理
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。 https://windtear.net/archives/2005/07/24/000725.html http://windtear.net/archives/2005/07/24/000725.html exclude='' if [ -f /opt/ipcn/etc/exclude.conf ]; then exclude=`cat /opt/ipcn/etc/exclude.conf` fi exclude=$exclude' lost+found default' for dir in /opt/www/*; do if [ -d $dir ]; then s_dir=`echo $dir | sed -e 's/\/opt\/www\///'` if ! echo $exclude | grep '\<'$s_dir'\>' >/dev/null; then echo $s_dir fi fi done |
Posted by windtear at July 24, 2005 8:08 PM