News for hackers. Stuff that matters.
Re:Something about functions in Bash (2017) by derekp7 on Thursday July 05, 2018 @05:42PM (#17467094)
Something else you can do with BASH functions is use:

    declare -f function_name
to print out the contents of a function, in a format that can be directly evaluated with command substitution. This is useful if you want to send a function (or a number of functions) into another BASH instance (such as via an SSH connection).

A google search for "RPC in Bash" will take you to a GIST I put up on Github a while back that gives details of how this works.

You can do this in ksh93 also, I believe you use typeset -f instead of declare -f.

Re:Something about functions in Bash (2017) by jodrellblank on Friday July 06, 2018 @12:29AM (#17468838)
You can do this in PowerShell also:

    get-content function:function_name
`function:` being a filesystem-like PS Provider.