I'm pretty new to the bash shell scripting game but have been catching on fairly well. I'm writing a script right now for the automated id3 data editing or mp3 files. I'm currently using the id3v2 command line program. These are mp3 files that are coming from a police scanner program I have recording. I'm wondering if there is a way to make a variable related to the number the file...you know I'm not sure how to word this. Sorry, been battling a headache for the last couple of days. I can explain it like this.
So if I were in a directory of recordings I can easily get them listed in order because the time they were recorded is a part of the file name. So a general ls command would produce something like
File_012030.mp3
File_012040.mp3
File_012045.mp3
I would like to use a variable to assign the track number to each files id3 data. My first thought is to somehow use the number of how far down it is in the list of files in that directory. So the above example would be.
File_012030.mp3 <- 01
File_012040.mp3 <- 02
File_012045.mp3 <- 03
Is this something that would be possible?