4
3
I just wonder the distinction calling the function between $(one_function)
and one_function
in bash shell script.
When I set the variable PS1
in ~/.bashrc
, I can't invoke the function by one_func
ex:
export PS1="\n\[\e[31m\] \$(one_func) # it works
export PS1="\n\[\e[31m\] one_func # it doesn't work