Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Bash - Split Path
- Easy tool to split the current $PATH of the system into individual lines.
- ```bash
- #!/bin/bash
- {
- for i in $(echo "$PATH" | sed 's/:/ /g'); do echo $i; done;
- } || echo "Failed."; exit 127;
- ```
- ## Example
- ```
- ExampleStation:~ genuser1$ for i in $(echo "$PATH" | sed 's/:/ /g'); do echo $i; done;
- /usr/local/opt/llvm/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /usr/local/bin
- /usr/local/go/bin
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement