LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-17-2004, 11:15 AM   #1
sutley
Member
 
Registered: Jul 2004
Posts: 42

Rep: Reputation: 15
bash scripting


Well,
I thought I had a problem, but I worked it out. It was a very stupid mistake of leaving out an argument. So I deleted my question and am posting my solution.

I wanted to edit the id3 tag info for my tracks that follow a naming patter like:
tracknum-trackname.mp3

This is what I came up with using id3edit as the tag editor:

#!/bin/bash
# allofmp3id3.sh
# adds track and genre to mp3s

genre=$1
criteria='.mp3'

for i in $( ls *$criteria* );
do
file=$i
track=`expr substr $file 1 2`
echo "Track Number $track"
id3edit -t $track -g $genre $file
done

I use it by:

# sh id3.sh [GENRE NUMBER - e.g. Country = 2]

sam

Last edited by sutley; 12-17-2004 at 12:45 PM.
 
Old 12-17-2004, 11:33 AM   #2
sutley
Member
 
Registered: Jul 2004
Posts: 42

Original Poster
Rep: Reputation: 15

Last edited by sutley; 12-17-2004 at 12:45 PM.
 
  


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
bash scripting problem (bug?) zz9pluralzalpha Linux - Software 2 04-12-2005 01:51 PM
bash scripting problem Sammy2ooo Linux - General 3 12-13-2004 12:31 PM
BASH Scripting Design Problem... amaze Linux - General 1 08-19-2003 08:30 AM
BASH scripting problem deadlock Programming 5 08-15-2003 04:33 AM
bash scripting problem raven Programming 7 03-10-2003 05:48 PM


All times are GMT -5. The time now is 05:23 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration