#!/pkg/ldc/bin/perl unless (-f $ARGV[0]) { print "File $ARGV[0] does not exist\n"; exit } $psps = `/pkg/esps/bin/epsps -Da $ARGV[0]|grep Copied`; chop($psps); unless ($psps =~ /Copied from (.*), records (\d*) to (\d*)$/) { print "Abort \n"; exit } $origFile = $1; $start = $2; $end = $3; print "$start, $end\n"; $start -= int($ARGV[3] * 44100) ; $end += int($ARGV[4] * 44100); $com = "/pkg/esps/bin/copysd -r $start:$end $origFile $ARGV[1]"; print "$start, $end\n"; print "$com\n";