Last active
March 28, 2021 23:33
-
-
Save skurhse/3e865b2331e2c9faa7e21c03bac26d48 to your computer and use it in GitHub Desktop.
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/bash | |
env 1>&1 | | |
grep '^PATH=' 1> >(cat) | | |
cut -c 6- | | |
awk ' | |
{ | |
old = ":" | |
new = "\n" | |
while ($0 ~ /:/) { | |
idx = index($0, old) | |
$0 = substr($0, 1, idx-1) new substr($0, idx+length(old)) | |
} | |
} 1 | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment