Re:Bash function names can be almost anything
by abarker on Sunday July 04, 2021 @08:01PM
(#27733603)
Bash function names also have a different namespace than Bash variables, so you can define a function and a shell variable with the same name. I used that in a script which defines a function to be used like an alias to change to a specified directory, but where the name is also set as a shell variable that can be evaluated with $ to give the directory's pathname.
[ Parent
| on HN ]
There are no comments on this comment yet.