shellfunction-definitionashdash-shell

Show function definition in Ash and Dash


In bash, you can use type to show the body of a function, as in

bash-4.3$ myfunc() { echo $@ ;}
bash-4.3$ type myfunc
myfunc is a function
myfunc () 
{ 
    echo $@
}

How can I display a shell function body in Ash and Dash?


Solution

  • Not possible in a POSIX shell such as dash.