What are the uses of the hash character in shell scripting beyond using them in comments or as $#
; what are other uses?
I want to be able to grep
the content on each line before hash since there are comments in the same line as code.
The application context is mainly korn shell, the system I use is "HP-UX ***B.11.31 U ia64 *****unlimited-user license".
#
in bash scripting?grep
because of the complexity of the shell's token recognition. A#
that occurs after a backslash, or in a string, or as part of a shell parameter like$#
or${parameter#word}
, or (in some shells) numeric constants like base#number, is not treated as a comment.