Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- smaug# cat sfvall
- #!/bin/bash
- #Author: MaxG
- #Script to sfvcheck all sfv files in subdirs using chsfv -f command
- #The script will check starting from path ($1) or current location (pwd)
- if [ x"$1" != "x" ] ; then
- p=$1
- else
- p=`pwd`
- fi
- log="/tmp/sfvall-result"
- >$log
- #pwd=`pwd`
- echo "Scanning for SFVs in $p" >> $log
- for s in $(find $p -name "*.sfv")
- do
- echo "" >> $log
- dirpath=`dirname $s`
- echo $dirpath
- echo "Checking SFV for $s" | tee -a $log
- # echo "Checking SFV for $s"
- # cd $dp
- cksfv -v -c -f $s -C $dirpath | tee -a $log
- done
- read -p "Show log? (y/n): " -n 1 shlog
- echo ""
- if [[ $shlog == "y" ]] ; then
- cat $log
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement