LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-01-2010, 12:59 AM   #1
killerwake
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Rep: Reputation: 0
read mp3 filenames from a dir and write id3


hi linux gurus...

need your help again, if i have a dir with several mp3's files:

example:

[root@xxx]ls -l

-rwxr-xr-x 1 web2 client1 6222573 Nov 26 17:34 01 Artist1 - Song1.mp3
-rwxr-xr-x 1 web2 client1 4989384 Nov 26 17:34 02 Artist2 - Song2.mp3
-rwxr-xr-x 1 web2 client1 6987438 Nov 26 17:36 03 Artist3 - Song3.mp3

and i need to update the id3 tag of all files with the command:

/usr/bin/id3v2 -a "Artist1" -t "Song1" Artist1 - Song1.mp3


how i do a loop to read the filename and execute the id3v2 command for each file, as i have filenames with spaces and special chars ex:"^~".

thanks!
 
Old 12-01-2010, 01:44 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,562

Rep: Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900
Assuming you are running from within the directory you can do:
Code:
for FILE in *
do
    <your stuff here>
done
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Read Write access to a iso9660 filesystem..mount a .iso image as read write ceazar123 Linux - Newbie 16 09-01-2010 10:07 AM
Read Write access to a iso9660 filesystem..mount a .iso image as read write ceazar123 Linux - General 2 08-26-2010 04:32 PM
MP3 ID3 Tag/Meta Data heri0n Linux - Software 2 08-28-2006 11:45 AM
Updating ID3 (MP3) Tags DJ747 Linux - Software 3 05-15-2005 12:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration