Files
bin/fv
2009-09-12 18:27:05 +02:00

21 lines
461 B
Bash
Executable File

#!/bin/bash
#set -x
name=$1
tempfile=/tmp/fv_recs
svdrpsend.pl LSTR | grep -i $name | sed "s/^[0-9-]* //g" > ${tempfile}_1.tmp
#cat ${tempfile}_1.tmp
cat ${tempfile}_1.tmp | awk '{for(i=3; i<NF; i++) printf("%s_",$i); printf("%s\n",$NF);} ' | sed "s/~/\//g" > ${tempfile}_2.tmp
for i in $(<${tempfile}_2.tmp)
do
x=$(echo -n $i | sed "s/\r//g" | sed "s/:/#3A/g" | sed "s/\?/#3F/")
du -sh /video/$x | sed "s/\/video\///g"
done
#rm $tempfile_*.tmp