Trying to describe regular expressions for use with the archive server, I just realized that arch_retrieve passes the regular expression unquoted to egrep. This means that regular expressions may not contain whitespace or shell meta characters. Is this intentional, or just a flaw? Hans-Albert PS: Shell meta characters seem not to hurt ([], (), and | work fine). How comes? Does flist unset IFS? -- Hans-Albert Schneider <Hans-Albert.Schneider@mchp.siemens.de> Siemens AG phone: (+49) 89 636 45445 Corporate Technology fax: (+49) 89 636 42284 Munich, Germany -- To get my public PGP key, send me a mail with subject "send key" --
Hans-Albert Schneider <Hans-Albert.Schneider@mchp.siemens.de> writes:
Trying to describe regular expressions for use with the archive server, I just realized that arch_retrieve passes the regular expression unquoted to egrep. This means that regular expressions may not contain whitespace or shell meta characters. Is this intentional, or just a flaw?
Looks like a flaw to me. The use of $regxp on line 255 of arch_retrieve should be in double quotes.
PS: Shell meta characters seem not to hurt ([], (), and | work fine). How comes? Does flist unset IFS?
Shell syntax characters like (), |, and ; are never special when enountered as the result of variable expansion: shell syntax parsing is required to take place before variable expansion. If no matches are found to a file globbing, the pattern is left unexpanded. Philip Guenther
participants (2)
-
Hans-Albert Schneider
-
Philip Guenther