for i in $(echo "$PATH" | sed 's/:/ /g'); do echo $i; done;
- Replace colon to space in $PATH
- Pass to for command space separated $PATH
for
command ( foo roop ) catches that strings as multiple arguments ( so not quote string )- So double quotationed string pattern does not work well because for command get in string one argument. ( e.g
"$(echo "$PATH" | sed 's/:/ /g')"
)
- So double quotationed string pattern does not work well because for command get in string one argument. ( e.g