Sponsored Content
Top Forums Shell Programming and Scripting Error on id3v2 automation script Post 302999205 by itschrisonline on Thursday 15th of June 2017 08:57:51 AM
Old 06-15-2017
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
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Urgent FTP script automation

Hi guys, Here is my requirement for ftp script that i have to automate in unix using shell script: 1) Find the files that atre created one week from the present day. 2) ftp them to the backup server. 3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies

2. Filesystems, Disks and Memory

Urgent FTP script automation

Hi guys, Here is my requirement for ftp script that i have to automate in unix using shell script: 1) Find the files that atre created one week from the present day. 2) ftp them to the backup server. 3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies

3. Shell Programming and Scripting

FTP automation script

Hi, I have got a requirement like this. a parameterized function custFtp which will take 5 i/ps and will do the following tasks. p1) server name p2) username p3) password p4) path name of the server where the file resides p5) file name pattern the function will work like this. ... (1 Reply)
Discussion started by: ani_datta
1 Replies

4. Shell Programming and Scripting

Help with Shell Script automation

can someone look into this one please... I am struck at this point. I do not know what logic to be followed here. I can go ahead with my work only, if this step is done. Please Help. I have a process X in a shell script. Once the process X is done, it generates a log file. Process X is basically... (1 Reply)
Discussion started by: ss3944
1 Replies

5. Shell Programming and Scripting

Help with Swapinfo automation Alert script

I am new to unix scripting (HP-UX) and need to write a script for checking memory usage. I am using "ipcs -ma" and using "awk" to select specific colums and redirecting output to variable. /usr/bin/ipcs -ma | awk '{ print $5,$10,$12}' > $TMP_FILE exec < $TMP_FILE while read line; do ... (1 Reply)
Discussion started by: JamesBond007
1 Replies

6. Shell Programming and Scripting

Boot/Shutdown script automation

Looking to automate some commands to run at boot and poweroff in a startup/shutdown script. How do I place it on the system so that it will be run automatically? I don't want to use cron, not quite specific enough, random times when I may boot or shutdown. ---------- Post updated at 10:47 PM... (8 Replies)
Discussion started by: 3therk1ll
8 Replies

7. Shell Programming and Scripting

Script Automation

Hi Gurus, I have a clearcase script that i use to check in a single file at time on my clearcase server. the script is as follows setmyview settask 75098_MSI_TRILOGY_EIM cd /vobs/Trilogy_R12/custom/msieim/12.0.0/sql/ cleartool co -nc . ct mkelem -nc Filename_1.sql cp... (3 Replies)
Discussion started by: r_t_1601
3 Replies

8. Shell Programming and Scripting

awk script automation

I have the below code which calculates the time difference between src and dst from a large trace file. The code works for a given source and destination. However, I want to automate the code to go over any src and destination. The format of the source is like that: X.Y where x is always =2 and Y... (10 Replies)
Discussion started by: ENG_MOHD
10 Replies

9. Shell Programming and Scripting

Automation script

Hello All , I came across a tricky solution to devolop . Here is a part of the requirement automation . I have different set of server say : Web ( has 4 servers under it ) , App ( has 4 servers under it ) , DB ( has 2 servers under it ) Above each i have different load balancers , Say : Web... (4 Replies)
Discussion started by: radha254
4 Replies

10. Shell Programming and Scripting

Automation Script for Oracle

Hi, As a Oracle Developer, I am writing many Procedures,Functions and Packages. Facing Many optimization issue after writing these Database objects. Trying to tune it manually. Can we write any Shell/Perl/Python script to Optimize these Database objects instead of doing manual check and... (1 Reply)
Discussion started by: vasuvv
1 Replies
ATF-SH(1)						    BSD General Commands Manual 						 ATF-SH(1)

NAME
atf-sh [-s shell] -- interpreter for shell-based test programs SYNOPSIS
atf-sh script DESCRIPTION
atf-sh is an interpreter that runs the test program given in script after loading the atf-sh(3) library. atf-sh is not a real interpreter though: it is just a wrapper around the system-wide shell defined by ATF_SHELL. atf-sh executes the inter- preter, loads the atf-sh(3) library and then runs the script. You must consider atf-sh to be a POSIX shell by default and thus should not use any non-standard extensions. The following options are available: -s shell Specifies the shell to use instead of the value provided by ATF_SHELL. ENVIRONMENT
ATF_LIBEXECDIR Overrides the builtin directory where atf-sh is located. Should not be overridden other than for testing purposes. ATF_PKGDATADIR Overrides the builtin directory where libatf-sh.subr is located. Should not be overridden other than for testing purposes. ATF_SHELL Path to the system shell to be used in the generated scripts. Scripts must not rely on this variable being set to select a specific interpreter. EXAMPLES
Scripts using atf-sh(3) should start with: #! /usr/bin/env atf-sh Alternatively, if you want to explicitly choose a shell interpreter, you cannot rely on env(1) to find atf-sh. Instead, you have to hardcode the path to atf-sh in the script and then use the -s option afterwards as a single parameter: #! /path/to/bin/atf-sh -s/bin/bash ENVIRONMENT
ATF_SHELL Path to the system shell to be used in the generated scripts. SEE ALSO
atf-sh(3) BSD
September 27, 2014 BSD
All times are GMT -4. The time now is 09:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy