naming - Exclamation point in bash function name - should I? -
naming - Exclamation point in bash function name - should I? -
i'm writing bash script , it's convenient utilize exclamation point in function name.
example:
class="lang-bsh prettyprint-override">function hello! { echo goodbye } function hello { echo hello }
and works!
after looking through specs, found this:
name word consisting solely of letters, numbers, , underscores, , origin letter or underscore. names used shell variable , function names. referred identifier.
i sense i'm breaking rules here. wrong? mess in future? what's going on?
out of burning curiousity, why much more convenient utilize exclamation point in function name?
generally, portability reasons, may not want utilize bang; because interpreter on particular os accepts it, if need deploy script elsewhere, other interpreters of different flavors/versions may not accepting.
bash naming
Comments
Post a Comment