Unix/Linux Go Back    

OS X (Apple) OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple.

I have searched, but I am confused

OS X (Apple)

Thread Tools Search this Thread Display Modes
Old Unix and Linux 11-17-2008
virgo virgo is offline
Registered User
Join Date: Nov 2008
Last Activity: 30 March 2009, 4:14 PM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
I have searched, but I am confused

Please forgive me if a similar question has already been asked.Linux

I have searched and found many possible solutions to my query.
I would appreciate it if someone can point me to a thread to accomplish my task.

I am trying to change values from a Master file to a File to be modified

Since there are about thousands of entries, I am trying to do this with a script and not manually.

Here is an example of one such entry.
Master file

Y:\Music\iTunes\iTunes Music\Andain\Beautiful Things\04 Beautiful Things (Photon Project remix).mp3	Beautiful Things (Photon Project remix)	Andain	138.00

File to be modified

<ENTRY MODIFIED_DATE="2008/11/16" MODIFIED_TIME="61889" AUDIO_ID="Ajw83d3d3d3d3d3d3d2p3d3d3d3d3d3d3d3azd3d3d3uuZZmd2VVj///////////////7P///////////////e/////////////////////////////////////////////////WVnd3h3msyqh7uJiM7+3O7cy7eKqqqrzczLu6qs3d3LvN3d7///3v///////////////J///////////////+//////////////////7N7cvszf/v/v7//////////////////////////////////+7/////////////////////////////////////////////////QQAAAA==" TITLE="Beautiful Things (Photon Project remix)" ARTIST="Andain"><LOCATION DIR="/Users/virgo/Music/iTunes/iTunes Music/Andain/Beautiful Things/" FILE="04 Beautiful Things (Photon Project remix).mp3" VOLUME="Macintosh HD" VOLUMEID="Macintosh HD"></LOCATION>
<ALBUM TRACK="4" TITLE="Beautiful Things"></ALBUM>
<INFO BITRATE="320000" GENRE="Trance" LABEL="Robbins Entertainment" COMMENT="Trance" COVERARTID="112:QHQJABBQRRIX0AZ3X5NXAUFX2EXD" PLAYCOUNT="4" PLAYTIME="571" RANKING="0" IMPORT_DATE="2008/11/4" LAST_PLAYED="2008/11/7" FILESIZE="22432"></INFO>
<TEMPO BPM="137.000473" BPM_QUALITY="100"></TEMPO>
<LOUDNESS PEAK_DB="-1.1137042" PERCEIVED_DB="-2.310534"></LOUDNESS>
<CUE_V2 NAME="AutoGrid" DISPL_ORDER="0" TYPE="4" START="3.6027959554479541" LEN="0" REPEATS="-1" HOTCUE="0"></CUE_V2>

The value I need to change in this example is from:

<TEMPO BPM="137.000473"


<TEMPO BPM="138.00"

What would the best approach be?
awk, sed or...?


Last edited by virgo; 11-17-2008 at 11:36 PM..
Sponsored Links
Old Unix and Linux 01-30-2009
otheus's Unix or Linux Image
otheus otheus is offline Forum Advisor  
Join Date: Feb 2007
Last Activity: 6 September 2017, 5:43 AM EDT
Location: Innsbruck, Austria
Posts: 2,157
Thanks: 12
Thanked 51 Times in 48 Posts
Hopefully 2 months isn't too long to answer a question Linux

I think sed would be better here.

sed 's/TEMPO BPM="137.000473"/TEMPO BPM="138.00"/'

Sponsored Links

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
Grabbing Keywords Below a Searched Keyword jl487 Shell Programming and Scripting 8 04-24-2012 11:10 AM
greping last occurrence of the searched string vidurmittal Shell Programming and Scripting 4 07-28-2009 07:06 AM
how to get lines prior to the line being searched arunrao_oradba Shell Programming and Scripting 2 01-13-2009 02:10 PM
How to print the files names that being searched umen Shell Programming and Scripting 2 12-26-2007 01:49 AM
Unix ISO's for FTP, I've searched the other Posts killrazor UNIX for Dummies Questions & Answers 3 10-11-2002 10:05 AM

All times are GMT -4. The time now is 03:25 AM.