Skip to content

Instantly share code, notes, and snippets.

@prufrock
Created March 30, 2011 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prufrock/893821 to your computer and use it in GitHub Desktop.
Save prufrock/893821 to your computer and use it in GitHub Desktop.
uses perl in an awk like manner to increment a version number
#!/bin/sh
perl -i -pe ';s/(Version: [0-9]+\.[0-9]+\-)([0-9])//; if($1){print $1 . ($2 + 1)}' package/DEBIAN/control
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment