#!/bin/sh if [ $# != 1 ] then echo "please input this:rmexefile dir" exit 1 fi dirname=$1; if [ $dirname != "." ] then cd $dirname if [ $? != 0 ] then echo "dir:${dirname} is error" exit 1 fi fi ls | grep -v ".sh" | while read filename do if [ -d $filename ] then continue fi if [ -x $filename ] then echo $filename fi done
shell程序删除某一目录下的可执行程序
最新推荐文章于 2022-12-18 17:43:38 发布