Re: Need help with scripting
On Thursday 17 October 2002 12:48, Kenneth Macdonald Karlsen wrote:
> Hi all.
> Im sorting out my 2000+ mp3 files.
> Some of them i want to convert to wav files of various reasons.
> Its a rather boring job to do that manualy so i thought i would write a
> script. Im VERY inexperienced in this so help is needed.
> Ive got this far:
>
> ken@pingu:~/brenning/test$ cat skript
> #!/bin/bash
> clear
> echo "type name of file that shall go from mp3 to wav"
> echo "ending of file is mp3.wav not solved yet"
> read filename
> mkdir wavfiles
> mpg321 --w $filename.wav $filename
> #rm -rf $filename
> mv $filename.wav wavfiles
>
#!/bin/sh
if [! -d wavfiles ]; then
mkdir wavfiles
fi
for file in $@; do
base=`basename $file .mp3`
mpg321 --w ${base}.wav $file
mv ${base}.wav wavfiles
done
and you can call it:
skript alice_in_chains*
Reply to: