Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'final update' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
final update
Authored by: ChrisR on Apr 12, '04 09:32:05PM

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.


#!/usr/bin/awk -f
BEGIN { print "CD_DA\n" }
{ FS = "\n"; RS = ""
  if ($2 == "TRACK AUDIO") {
    print $2
    if ($NF ~ /^START/) { 
      sub(/^START/, "PREGAP", $NF)
      print $NF
    }
    FS = " "; RS = "\n"
    "ls *.flac" | getline file
    sub(/flac$/, "wav", file)
    print "FILE \"" file "\" 0\n"
  }
}


[ Reply to This | # ]