Skip to content

Instantly share code, notes, and snippets.

@bjorand
Created December 11, 2014 08:24
Show Gist options
  • Save bjorand/0d1bd4f65f5038f13766 to your computer and use it in GitHub Desktop.
Save bjorand/0d1bd4f65f5038f13766 to your computer and use it in GitHub Desktop.
#!/bin/bash
awk 'BEGIN{ser=strftime("%Y%m%d",systime() )*100+1} /serial/{sub($1,$1 < ser ? ser : $1+1)}1' $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment