Skip to content

Instantly share code, notes, and snippets.

@dlangille dlangille/output
Created Dec 6, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.