[ale] One for systemd haters

Solomon Peachy pizza at shaftnet.org
Tue Oct 9 14:35:58 EDT 2018


On Tue, Oct 09, 2018 at 06:23:29PM +0000, Lightner, Jeffrey via Ale wrote:
> As an FYI the “-“ at start of file name doesn’t just affect 
> grep/egrep.  Any command that tries to look at * in a directory will 
> have the issue because it expands that “-“ as if it were an additional 
> flag to the command issued rather than just the start of a file name.

The thing is, leading '-' is perfectly legal for a POSIX filename.  
Which is why getopt and other bog-standard cmdline parsing libraries 
implement the special '--' option to signify that subsequent arguments 
are filenames rather than options.

This quirk of shell wildcard expansion/ambiguity isn't anything new, 
especially to anyone who has had to work with real-world-supplied 
filenames.

 - Solomon
-- 
Solomon Peachy			       pizza at shaftnet dot org
Coconut Creek, FL                          ^^ (email/xmpp) ^^
Quidquid latine dictum sit, altum videtur.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://mail.ale.org/pipermail/ale/attachments/20181009/70912d87/attachment.sig>


More information about the Ale mailing list