lkml.org 
[lkml]   [2019]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [RFC PATCH] kbuild: check uniqueness of basename of modules
Date
From: Masahiro Yamada
> Sent: 15 May 2019 18:55
...
> > xargs basename -a -- | sort | ...
>
> Sorry for my ignorance, but could you
> teach me the effect of "--" ?
>
> I sometimes use "--" as a separator
> when there is ambiguity in arguments
> for example, "git log <revision> -- <path>"
>
> In this case, what is intended by "--"?

The '--' stops getopt() from parsing any more parameters.
Useful things like 'grep -- -q' which will search for the
string '-q' rather than treating it as a command line option.

This is all made more horrid by a decision by the writers
of glibc getopt() to 'permute' argv[] so that 'options'
can follow 'nonoptions' ie it converts:
prog file -arg
to
prog -arg file
The only program the historically allowed 'late' options
was 'rlogin hostname -l username'.
This is just broken.....

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
\
 
 \ /
  Last update: 2019-05-16 11:01    [W:0.076 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site