I am writing a bash script that calls functions declared in the parent shell, but it doesn\'t work.
For example:
$ function myfunc() { echo \"Here in
@OP, normally you would put your function that every script uses in a file, then you source it in your script. example, save
function myfunc() { echo "Here in myfunc" ; }
in a file called /path/library. Then in your script, source it like this:
#!/bin/bash . /path/library myfunc