Last active
June 8, 2021 01:25
Revisions
-
rdmarsh revised this gist
Jun 8, 2021 . No changes.There are no files selected for viewing
-
rdmarsh created this gist
Jun 8, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ zc/one/two/three/four zc/one/two/three zc/one/two zc/one This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ #!/usr/local/bin/bash set -eu group="zc/one/two/three/four" while [[ "${group}" == *"/"* ]] ; do echo "${group}" group="${group%/*}" done