Skip to content

Instantly share code, notes, and snippets.

@packer-
Created February 25, 2018 14:22
Show Gist options
  • Save packer-/f5b769e6d14b42bfd0f8ac5cca673c8c to your computer and use it in GitHub Desktop.
Save packer-/f5b769e6d14b42bfd0f8ac5cca673c8c to your computer and use it in GitHub Desktop.
#!/bin/bash
sed 's/"\([0-9]*\),\([0-9]*\)"/\1\.\2/g' demolist_sorted.csv > /tmp/fewqfhre
while read line; do
echo $line | grep ^sv_autodemos &>/dev/null || continue
demo="$(echo $line | grep -Eo '[^/]*\.dem')"
output="$(echo $line | cut -d, -f5,6,7 | tr ',' '-')"
pos="$(echo $line | cut -d, -f7)"
starttime="$(echo $line | cut -d, -f10)"
duration="$(echo $line | cut -d, -f11)"
echo $demo $output x $starttime $duration $pos
done < /tmp/fewqfhre
rm /tmp/fewqfhre
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment