Translate

Archives

Source a Function in KSH93

Ksh93 allows you to source a file or a function into local scope. Other shells support sourcing a file but ksh93 is the only shell that I am aware of that allows you to also invoke a function with the source command. From the KSH93 manpage: . name [ arg … ] If name is a function defined with the function name reserved word syntax, the function is executed in the current environment (as if it had been defined with the name() syntax.) Otherwise if name refers to a file, the file is read in its entirety and the commands