Created
August 22, 2012 03:33
-
-
Save notyy/3422084 to your computer and use it in GitHub Desktop.
extract user story
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exec scala -nc "$0" "$@" | |
!# | |
import scala.io._ | |
val source = if(args.length>0) Source.fromFile(args(0)).getLines else Source.stdin.getLines | |
val pattern = """([a-zA-Z]+)-(\d+)""".r | |
source.flatMap(pattern.findFirstIn).toList.distinct.foreach(println) | |
//=============USAGE====================== | |
you can git log > txt file, then pass the txt file path to this script | |
or | |
you can pipe git log to it : git log | script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment