批量解压
#! /bin/sh
for i in *.zip
do
k=$i
s=${k%.zip*}
echo $s
unzip $i -d $s
done
批量改名
for i in problem*
do
k=$i
s=${k#*problem*}
mv $i $s
done
将目录下的所有文件名写入文档
for i in *
do
echo -n "$i," >> a.txt
done
# 打印出来
# 10022,10023,10024,10027...
#! /bin/sh
for i in *.zip
do
k=$i
s=${k%.zip*}
echo $s
unzip $i -d $s
done
for i in problem*
do
k=$i
s=${k#*problem*}
mv $i $s
done
for i in *
do
echo -n "$i," >> a.txt
done
# 打印出来
# 10022,10023,10024,10027...