利用awk批量改文件名
时间:2006-07-14 来源:Justin-Song
#!/bin/bash
# ls -1 *.mp4 | awk -F. '{ print "mv "$1"."$2" "$1"lala.mp4" }' for dir in `ls -l | grep ^d | awk '{ print $9 }'`
do
ls -1 $dir/*.mp4 | awk -F. '{ print "mv "$1"."$2" "$1"lala.mp4" }'
done changename.sh: #!/bin/bash
# awk -F'[. ]' '{print "mv "$3"."$4" "$3"_"$1"."$4}' md5.txt
# ls -1 *.mp4 | awk -F. '{ print "mv "$1"."$2" "$1"lala.mp4" }' for dir in `ls -l | grep ^d | awk '{ print $9 }'`
do
ls -1 $dir/*.mp4 | awk -F. '{ print "mv "$1"."$2" "$1"lala.mp4" }'
done changename.sh: #!/bin/bash
# awk -F'[. ]' '{print "mv "$3"."$4" "$3"_"$1"."$4}' md5.txt
相关阅读 更多 +