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

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -