Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    One may play games in bash too, starting with function /bin/sh { echo "$0: $FUNCNAME: Permission denied"; return 126; }, and potentially useful things too with functions named --, //, @ or % etc. Commented Nov 27, 2015 at 17:44
  • but dont shells tend to bypass a hash-table lookup when / is found in a name? and a function isnt just an executable name - its code. i would think a simple implementation could encounter a lot of parse problems if its stored function names included metacharacters. Commented Nov 27, 2015 at 17:46
  • Yes, I am aware of the inability of bash to contain nulls in vars, that could be reasonably extended to function names. I do not have an specific example, but I do feel that this games of allowing almost anything for names is more of a potential security breach than an "easy way to work". I hope I am wrong. Commented Nov 27, 2015 at 19:01