All pastes #813716 Raw Edit

Unbenannt

public text v1 · immutable
·published 2007-12-12 19:09 UTC
rendered paste body
### das script ###

#!/bin/bash

find /home/titan/glftpd/glftpd/site/REQUESTS/ -name \*.mp3 -print | while read file
do


output=`mp3info -p "%f %a %t %l %c %n %y %g %F %k %C %L %o %u %b %Q %S" "$file"`
fileName=`echo $output | awk '{print $1}'`
artistName=`echo $output | awk '{print $2}'`
rlsName=`echo $file | rev | awk -F/ '{print $2}' | rev`
titleName=`echo $output | awk '{print $3}'`
albumName=`echo $output | awk '{print $4}'`
commentName=`echo $output | awk '{print $5}'`
trackName=`echo $output | awk '{print $6}'`
yearName=`echo $output | awk '{print $7}'`
genreName=`echo $output | awk '{print $8}'`
filesizeName=`echo $output | awk '{print $9}'`
copyrightName=`echo $output | awk '{print $10}'`
layerName=`echo $output | awk '{print $11}'`
stereoName=`echo $output | awk '{print $12}'`
goodframesName=`echo $output | awk '{print $13}'`
badframesName=`echo $output | awk '{print $14}'`
frequencyName=`echo $output | awk '{print $15}'`
playtimeName=`echo $output | awk '{print $16}'`




#echo "INSERT INTO MP3INFO (rlsname,filename,artist) VALUES (\'"$rlsName"'\,\'"$fileName"\',\'"$artistName"\',\'"$titleName"\,\'"$albumName"\,\'"$commentName"\,\'"$trackName"\,\'"$yearName"\,\'"$genreName"\,\'"$filesizeName"\,\'"$copyrightName"\,\'"$layerName"\,\'"$stereoName"\,\'"$goodframesName"\,\'"$badframesName"\,\'"$frequencyName"\,\'"$playtimeName"\)" >> uschi.sql

echo 1. rls:		"$rlsName" 
echo 2. file:		"$fileName" 
echo 3. artist: 	"$artistName" 
echo 4. title: 	"$titleName"
echo 5. album: 	"$albumName"
echo 6. comment:	"$commentName"
echo 7. year:		"$trackName"
echo 8. genre:	"$genreName"
echo 9. filesize:	"$filesize"
echo 10. copyright:	"$copyrightName"
echo 11. layer:	"$layerName"
echo 12. stereo:	"$stereo"
echo 13. goodframes:	"$goodframesName"
echo 14. badframes:	"$badframesName"
echo 15. frequency:	"$frequencyName"
echo 16. playtime:	"$playtimeName"

done