#!/bin/bash # for i in $(ls /etc/rc.d/rc3.d/ | grep "\<K");do echo $i.stop let sum1+=1 done for j in $(ls /etc/rc.d/rc3.d/ | grep "\<S");do echo $j.start let sum2+=1 done echo "There are $sum1 file names start with "K"." echo "There are $sum2 file names start with "S"."
-
#!/bin/bash
-
#
-
for i in $(ls /etc/rc.d/rc3.d/ | grep "\<K");do
-
echo $i.stop
-
let sum1+=1
-
done
-
-
for j in $(ls /etc/rc.d/rc3.d/ | grep "\<S");do
-
echo $j.start
-
let sum2+=1
-
done
-
-
echo "There are $sum1 file names start with "K"."
-
echo "There are $sum2 file names start with "S"."
原创文章,作者:N24_lantian,如若转载,请注明出处:http://www.178linux.com/63988