Skip to content

Instantly share code, notes, and snippets.

@CanadianJeff
Created February 1, 2022 08:23
Show Gist options
  • Save CanadianJeff/de30eecd38a008b76c919915832f1901 to your computer and use it in GitHub Desktop.
Save CanadianJeff/de30eecd38a008b76c919915832f1901 to your computer and use it in GitHub Desktop.
#!/bin/bash
while read -r a b; do
echo "\"$a\",\"$b\"" >> RESOURCE_OFFSETS.TXT # dump offest and length into file
if [ ! -f "$a.AUD" ] ; then # check if the file does not already exist
dd if=../RESOURCE.AUD of="$a".AUD bs=1 count="$b" skip="$a" iflag=skip_bytes,count_bytes # extract the raw audio
ffmpeg -nostdin -loglevel fatal -i "$a".AUD "$a".ogg # convert into modern format
else
echo "File $a.AUD Already Exists Skipping........"
fi
done < <(awk -F'[^0-9]*' '{if (NR!=1) {print $1$2$3$4" "$5$6}}' Logfile.CSV); # parse procmon csv logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment