diff --git a/fv b/fv index 7f55cc8..aa1ef02 100755 --- a/fv +++ b/fv @@ -5,17 +5,46 @@ name=$1 tempfile=/tmp/fv_recs +lstr2dir () { + local lstr=$1 + local lstrdate=$(echo $lstr | awk '{print $2}') + local lstrtime=$(echo $lstr | awk '{print $3}' | awk -F@ '{print $1}') +} svdrpsend.pl LSTR | grep -i "$name" | sed "s/^[0-9-]* //g" > ${tempfile}_1.tmp -#cat ${tempfile}_1.tmp +( +cat <<'EOF' +{ + split($1, date, "."); + dday=date[1]; dmon=date[2]; dyear=date[3]; + if(dyear>90) dyear=dyear+1900; + dyear=dyear+2000; + + split($2, tmp, ""); + split(tmp[1], t, ":"); + th=t[1]; tm=t[2]; + + printf("%d-%02d-%02d.%02d.%02d|", dyear, dmon, dday, th, tm); + for(i=3; i /tmp/x.awk + +awk -f /tmp/x.awk ${tempfile}_1.tmp | sed "s/\//#2F/g" | sed "s/~/\//g" > ${tempfile}_3.tmp cat ${tempfile}_1.tmp | awk '{for(i=3; i ${tempfile}_2.tmp -for i in $(<${tempfile}_2.tmp) +for i in $(<${tempfile}_3.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" + x=$(echo $i | awk -F'|' '{printf("%s",$2);}' | sed "s/\r//g" | sed "s/:/#3A/g" | sed "s/\?/#3F/") + f=$(echo $i | awk -F'|' '{printf("%s",$1);}') + s=$(find /video/$x -name "$f*.rec" -exec du -sh {} \; | awk '{ printf("%s", $1); }') # | sed -sh {} \; | sed + echo "$x ($s)" + #du -sh /video/$x | sed "s/\/video\///g" done rm ${tempfile}_*.tmp