Skip to content

Instantly share code, notes, and snippets.

@sprohaszka
Last active December 16, 2015 14:03
Show Gist options
  • Save sprohaszka/c88b86f772bbc4c7afd8 to your computer and use it in GitHub Desktop.
Save sprohaszka/c88b86f772bbc4c7afd8 to your computer and use it in GitHub Desktop.
Extract iOS App version number with awk
# Before pipe: extract lines between 2 patterns
# After pipe: `NR` select the line number to print
awk '/CFBundleVersion/ {p=1}; p; /string/ {p=0};' ../Project/Ressources/Info.plist | awk -F "[><]" 'NR==2 {print $3}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment