Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Error on id3v2 automation script

Shell Programming and Scripting


Tags
id3v2

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 06-15-2017
itschrisonline itschrisonline is offline
Registered User
 
Join Date: Oct 2016
Last Activity: 15 June 2017, 11:21 PM EDT
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Ubuntu Error on id3v2 automation script

Hi all,
I have some audiobooks which i'm trying to add the mp3tags based using id3v2 on the folder

Example:
Abigail Gibbs - (The Dark Heroine #01) - Dinner with a Vampire
Tags that I'm hoping to write
Artist: Abigail Gibbs
Album: The Dark Heroine #01
Song: Dinner with a Vampire

Any help would be great!!


A friend tried to help me with the following but it is failing big time

Cheers
Chris


Code:
  
#!/bin/bash 
find $1 -mindepth 1 -maxdepth 1 -type d | while read i
do
#   LINE=`echo $i |sed -e "s/$1\///g" -e 's/[()]//g' -e 's/ - /-/g' |awk -F - 'BEGIN{OFS="";} {print "-a \"",$1,"\" -A \"",$2,"\" -T \"",$3,"\$
#    LINE=`echo $i |sed -e "s/$1\///" -e 's/\(.*\) - (\(.*\)) - \(.*\)/-a "\1" -A "\2" -T "\3"/'`
    LINE1=`echo $i |sed -e "s/$1\///" -e 's/\(.*\) - (\(.*\)) - \(.*\)/\1/'`
      LINEa=`echo $i |sed -e "s/$1\///" -e 's/\(.*\) - (\(.*\)) - \(.*\)/\1/'` 
      LINEA=`echo $i |sed -e "s/$1\///" -e 's/\(.*\) - (\(.*\)) - \(.*\)/\2/'` 
      LINET=`echo $i |sed -e "s/$1\///" -e 's/\(.*\) - (\(.*\)) - \(.*\)/\3/'` 
   find "$i" -type f | while read j
   do
#      echo $LINE1 \'$j\'
#echo $LINE1
echo $LINEa
echo $LINEA
echo $LINET
#echo -a \"$LINEa\" -A \"$LINEA\" -T  \"$LINET\" \'$j\'
      id3v2 -a \"$LINEa\" -A \"$LINEA\" -T  \"$LINET\" $j
#      ls "$j"
   done
done


Cheers again
Sponsored Links
    #2  
Old Unix and Linux 06-15-2017
rdrtx1 rdrtx1 is offline
Registered User
 
Join Date: Sep 2012
Last Activity: 18 August 2017, 1:46 PM EDT
Location: Houston, Texas, USA
Posts: 950
Thanks: 0
Thanked 322 Times in 306 Posts

Code:
#!/bin/bash
find $1 -mindepth 1 -maxdepth 1 -type d | while read i
do
   LINEa=`echo $i |sed -e "s/$1\///" -e 's/\(.*\) - (\(.*\)) - \(.*\)/\1/; s/"/\\"/g;'`
   LINEA=`echo $i |sed -e "s/$1\///" -e 's/\(.*\) - (\(.*\)) - \(.*\)/\2/; s/"/\\"/g;'`
   LINET=`echo $i |sed -e "s/$1\///" -e 's/\(.*\) - (\(.*\)) - \(.*\)/\3/; s/"/\\"/g;'`
   fl=`echo "$i" |sed 's/"/\\"/g;'`
   id3v2 -a "$LINEa" -A "$LINEA" -T "$LINET" "$fl"
done


Last edited by rdrtx1; 06-15-2017 at 09:57 AM..
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Automation script radha254 Shell Programming and Scripting 4 11-07-2015 04:44 AM
awk script automation ENG_MOHD Shell Programming and Scripting 10 10-28-2013 03:47 PM
Script Automation r_t_1601 Shell Programming and Scripting 3 05-10-2013 02:54 AM
Help with Shell Script automation ss3944 Shell Programming and Scripting 1 12-21-2009 12:01 PM
FTP automation script ani_datta Shell Programming and Scripting 1 10-23-2008 02:27 AM



All times are GMT -4. The time now is 02:17 PM.