5
votes
1answer
614 views

How do I unset or get rid of a bash function?

If you set or export an environment variable in bash, you can unset it. If you set an alias in bash, you can unalias it. But there doesn't seem to be an unfunction. Consider this (trivial) bash ...
7
votes
5answers
641 views

Finding the definition of a bash function

I work in an environment that has a lot of legacy shell script magic lying around. One thing used heavy from the command line are bash functions that get sourced from some file included from some ...
1
vote
1answer
212 views

Shell function parameter

Is there a way to declare and pass parameters for shell functions, like so ? function msg( m ) { read -p "Task #" + m + "done. Press any key to continue }
4
votes
3answers
722 views

How can I invoke a function in bash shell script

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 ...