Skip to content

Instantly share code, notes, and snippets.

@dlangille
Created December 6, 2019 14:43
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 dlangille/4b17ef73de13c6c3c9032a155ac99501 to your computer and use it in GitHub Desktop.
Save dlangille/4b17ef73de13c6c3c9032a155ac99501 to your computer and use it in GitHub Desktop.
extracting each element separated by : from within 113R:2019Q4:py36
$ ~/tmp/test-params
113R
2019Q4:py36
2019Q4
py36
#/bin/sh
buildjob="113R:2019Q4:py36"
buildjobtmp=$buildjob
buildjail=${buildjob%%:*}
buildjobtmp=${buildjob#*:}
buildtree=${buildjobtmp%%:*}
buildset=${buildjobtmp#*:}
echo $buildjail
echo $buildjobtmp
echo $buildtree
echo $buildset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment