Echo and backslash (bash) -


i'm trying make function in ~/.bashrc file uses echo command pass arguments through pipeline. works, when try input '\' character disappears. if type \\ (two '\') succeeds. heppens -e option...

so, how can make code below prints "foo\bar" instead of "foobar"?

func() {     echo -e "${@}" } 

it not echo interpretes backslash, shell. gets interpreted before function gets called. correct solution quote argument function.

func() {     echo -e "${@}" }  func 'foo\bar' 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -