Re: [Dorset] Sorting MP3s back into folders

2010-11-28 Thread Ralph Corderoy
Hi John, Interesting links. One thing to remember about [[]] is that its = operator isn't a simple string comparison, as test(1)'s/[(1)'s is, and it doesn't treat both operands the same. $ t() { echo true; } $ [[ hello? = hello? ]] && t true $ [[ hellox = hello? ]] && t true

Re: [Dorset] Sorting MP3s back into folders

2010-11-27 Thread John Carlyle-Clarke
On 27/11/10 20:43, Ralph Corderoy wrote: Hi Terry, #!/bin/bash directorytols=$1 for filename in $( ls "$directorytols") do if [ -d "$filename" ] ; then echo "Directory: $filename" elif [ -h "$filename" ] ; then echo "Symlink: $filenam

Re: [Dorset] Sorting MP3s back into folders

2010-11-27 Thread Sean Gibbins
On 27/11/10 20:43, Ralph Corderoy wrote: > That's enough wandering toff optic. :-) Not at all Ralph - I was basically repeating something I had stumbled across that did the trick, and had no idea how it worked, so all this is very interesting - thanks for taking the time to post it! Sean -- mu

Re: [Dorset] Sorting MP3s back into folders

2010-11-27 Thread Ralph Corderoy
Hi Terry, > #!/bin/bash > directorytols=$1 > for filename in $( ls "$directorytols") > do > if [ -d "$filename" ] ; then > echo "Directory: $filename" > elif [ -h "$filename" ] ; then > echo "Symlink: $filename" > else >

Re: [Dorset] Sorting MP3s back into folders

2010-11-27 Thread John Carlyle-Clarke
On 27/11/10 14:03, Terry Coles wrote: On Saturday 27 Nov 2010, John Carlyle-Clarke wrote: On 27/11/10 13:41, Terry Coles wrote: So. Is a bash script the best approach, or is there a better way? The filenames are descriptive, but not consistent, so they don't really help. Terry, doesn't Amar

Re: [Dorset] Sorting MP3s back into folders

2010-11-27 Thread Terry Coles
On Saturday 27 Nov 2010, Sean Gibbins wrote: > Sorry to be lazy and just dump the text on you, but hopefully you can > adapt it: > > #!/bin/bash > > O=$IFS > IFS=$(echo -en "\n\b") > for each in `ls -1 *.wav` > do > sox --norm "$each" -r 44100 -b 16 resampled_"$each" > done > IFS=$O Thanks.

Re: [Dorset] Sorting MP3s back into folders

2010-11-27 Thread Sean Gibbins
On 27/11/10 17:14, Terry Coles wrote: ---8<--- > OK. I've started trying to put together a script that will sort my tracks. > I've found two useful scripts on the web; one to create a list of filenames > in > a directory and one to parse out the ID3 tags. I've started with the list of > fi

Re: [Dorset] Sorting MP3s back into folders

2010-11-27 Thread Terry Coles
On Saturday 27 Nov 2010, Terry Coles wrote: > On Saturday 27 Nov 2010, Sean Gibbins wrote: > > On 27/11/10 13:41, Terry Coles wrote: > > > Does anyone know of a tool that can do this? OK. I've started trying to put together a script that will sort my tracks. I've found two useful scripts on the

Re: [Dorset] Sorting MP3s back into folders

2010-11-27 Thread Terry Coles
On Saturday 27 Nov 2010, Sean Gibbins wrote: > On 27/11/10 13:41, Terry Coles wrote: > > Does anyone know of a tool that can do this? > > Hi Terry, > > An alternative approach to yours might have been: > > - Copy the music directory to an alternative location (i.e. 'cp ~/Music > ~/Music_copy') >

Re: [Dorset] Sorting MP3s back into folders [correction]

2010-11-27 Thread Ralph Corderoy
Hi Sean, > Sorry, that will need to be 'cp -aR ~/Music ~/Music_copy' -a includes -R so just -a would do. ;-) Cheers, Ralph. -- Next meeting: Somewhere quiet, Bournemouth, ???day 2010-12-?? 20:00 Meets, Mailing list, IRC, LinkedIn, ... http://dorset.lug.org.uk/ How to Report Bugs Effectivel

Re: [Dorset] Sorting MP3s back into folders [correction]

2010-11-27 Thread Sean Gibbins
On 27/11/10 14:15, Sean Gibbins wrote: > On 27/11/10 13:41, Terry Coles wrote: >> Does anyone know of a tool that can do this? > Hi Terry, > > An alternative approach to yours might have been: > > - Copy the music directory to an alternative location (i.e. 'cp ~/Music > ~/Music_copy') Sorry, that

Re: [Dorset] Sorting MP3s back into folders

2010-11-27 Thread Sean Gibbins
On 27/11/10 13:41, Terry Coles wrote: > Does anyone know of a tool that can do this? Hi Terry, An alternative approach to yours might have been: - Copy the music directory to an alternative location (i.e. 'cp ~/Music ~/Music_copy') - Point Sound Converter (or Sound Konverter for KDE types) at th

Re: [Dorset] Sorting MP3s back into folders

2010-11-27 Thread Terry Coles
On Saturday 27 Nov 2010, John Carlyle-Clarke wrote: > On 27/11/10 13:41, Terry Coles wrote: > > So. Is a bash script the best approach, or is there a better way? The > > filenames are descriptive, but not consistent, so they don't really help. > > Terry, doesn't Amarok have an option to sort eve

Re: [Dorset] Sorting MP3s back into folders

2010-11-27 Thread John Carlyle-Clarke
On 27/11/10 13:41, Terry Coles wrote: Hi, I have around 600-700 audio tracks that I originally ripped from CDs into .ogg format for playing in Amarok. All of these are organised in folders categorised by Artist and then Album. Subsequent to this, I bought a plug-in car MP3 player, which didn't

[Dorset] Sorting MP3s back into folders

2010-11-27 Thread Terry Coles
Hi, I have around 600-700 audio tracks that I originally ripped from CDs into .ogg format for playing in Amarok. All of these are organised in folders categorised by Artist and then Album. Subsequent to this, I bought a plug-in car MP3 player, which didn't deal with .ogg and also couldn't han