|
|
a sed script for reformatting .toc files
I use cdrdao to rip the table of contents from CDs so that I can store it with my archived FLAC files. Problem is, the file that cdrdao creates contains more information than I care about - all I really want is the pregap information. sed to the rescue! The following script will only output the bare minimum information needed to burn a CD with pregaps identical to the source CD:
Save this script into a file named "striptoc" (or whatever you like) and use the following command to apply the changes to "old.toc" and save them to "new.toc":
Alternately, you could put it into a unix shell script for ease-of-use:
Now simply type 'striptoc cd.toc' and it will read the table of contents from your inserted CD and save it to "cd.toc". You will still need to edit the file by hand to add the filenames for the .wav files that you want to burn onto the CD.
useless use of hold space
The use of the hold space in the above code is completely unnecessary. Here's how the script should look:
Run the script with 'sed -f SEDSCRIPT > TOCFILE'
final update
Okay, here's my final update to the striptoc script. I ported it over to awk so that I could bring in a listing of flac files from the current directory.
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.14 seconds |
|