Created
December 6, 2019 14:43
-
-
Save dlangille/4b17ef73de13c6c3c9032a155ac99501 to your computer and use it in GitHub Desktop.
extracting each element separated by : from within 113R:2019Q4:py36
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
$ ~/tmp/test-params | |
113R | |
2019Q4:py36 | |
2019Q4 | |
py36 |
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 | |
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