Related to question 3451993, is it possible to call a function which is internal to subst.c (in the Bash source code) in a Bash script?
To invoke a bash function, simply use the function name. Commands between the curly braces are executed whenever the function is called in the shell script. The function definition must be placed before any calls to the function.
The manual page for Bash (e.g. man bash ) says that the -c option executes the commands from a string; i.e. everything inside the quotes.
It's called command substitution (posix specification) and it invokes a subshell. The command in the braces of $() or between the backticks ( `…` ) is executed in a subshell and the output is then placed in the original command. Unlike backticks, the $(...) form can be nested.
Bash supports loadable builtins. You might be able to make use of this to do what you want. See the files in your /usr/share/doc/bash/examples/loadables
(or similar) directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With