Skip to content

Instantly share code, notes, and snippets.

@whyvez
Created February 16, 2015 00:41
Show Gist options
  • Select an option

  • Save whyvez/283d90b975c4d0194ee6 to your computer and use it in GitHub Desktop.

Select an option

Save whyvez/283d90b975c4d0194ee6 to your computer and use it in GitHub Desktop.
ski-acro Winfree conversion script
#!/usr/bin/env bash
cat ~/Desktop/AcrobatzMassif21fevrier2015-copy.txt \
| awk '/Name=/ { print $0 }' \
| sed s/Massif/MAS/ \
| sed s/Stoneham/STO/ \
| sed s/Relais/REL/ \
| awk -v group=u8 '{ split($3, y, "/"); split(y[2],x,"-"); if(x[1]>=2007) print $0; }' \
# | awk -v group=u10 '{ split($3, y, "/"); split(y[2],x,"-"); if(x[1]<2007) print $0; }' \
| cat ~/Desktop/acro-prefix.txt - > ~/Desktop/acro-u8.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment