Skip to content

Instantly share code, notes, and snippets.

@norrs
Created June 19, 2012 16:48
Show Gist options
  • Save norrs/2955224 to your computer and use it in GitHub Desktop.
Save norrs/2955224 to your computer and use it in GitHub Desktop.
rockj@pandora:/tmp$ ls *commitmsg.txt
bad-commitmsg.txt commitmsg.txt
rockj@pandora:/tmp$ for i in `ls *commitmsg.txt`; do echo $i; cat $i; done;
bad-commitmsg.txt
this is not a good commit messsage
CV-123 even tho commit# is here but not on first line
commitmsg.txt
CVE-123 This is good commit message
yaii yaii
rockj@pandora:/tmp$ head -1 *commitmsg.txt | grep -E ^[[:alpha:]]\{1,3}-[[:digit:]]\{1,3\}
CVE-123 This is good commit message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment