regex - How to replace any character (e.g. ":") with new line in bash variable pattern substitution? -
I would like to use variable pattern replacement in $ PATH to replace ":"
< Code> echo $ {PATH /: / "& lt; what's here & gt;"}I tried:
$ echo {PATH /: /
P> You can use just quoted strings just like anywhere else.
"$ {PATH //: /}"
this:
echo "$ {PATH / (You probably want to replace the colon everywhere, not just the first event. Therefore, the
//
> No
/ .)
Comments
Post a Comment