Skip to content

Instantly share code, notes, and snippets.

@utamas
Created January 1, 2016 19:27
Show Gist options
  • Save utamas/d7890f9dc8230538d244 to your computer and use it in GitHub Desktop.
Save utamas/d7890f9dc8230538d244 to your computer and use it in GitHub Desktop.
Lists all jira ids (without prefix)
#!/bin/bash
current="$1"
pattern='JIRA-[0-9]+'
while [[ ${current} =~ (${pattern}) ]]; do
echo "${BASH_REMATCH[1]}"
current=${current##*${BASH_REMATCH[1]}}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment