#!/usr/bin/gawk -f BEGIN { if (ARGC != 3) { print "plsh205.awk Ver. 0.01" print "Params : " exit } son = 0 n = 0 while ((getline < ARGV[1]) > 0) { # Winampスタイル if ($0 ~ /^#EXT/) { continue } # Soniqueスタイル if ($0 ~ /^\[playlist\]/) { son = 1 continue } if ($0 ~ /^NumberOfEntries=/) { continue } # Soniqueスタイル if (son) { sub(/^File[1-9][0-9]*=/, "") } files[n++] = $0 } command = "copy-to-h205.awk " for (i = 0 ; i < n ; i++) { command = command "'" files[i] "' " } command = command "'" ARGV[2] "'" system(command) exit }