How do you call a function defined in .bashrc from the shell?

后端 未结 6 1422
醉梦人生
醉梦人生 2021-01-30 19:30

In my .bashrc, I have a function called hello:

function hello() {
   echo \"Hello, $1!\"
}

I want to be able to invoke hello() from the shell a

6条回答
  •  旧巷少年郎
    2021-01-30 20:15

    It's weird; my fuctin won't terminate untill I pass it to another bash instance, like this:

    bash myfunction

提交回复
热议问题