Subject: Re: bin/16834
To: Ignatios Souvatzis <is@netbsd.org>
From: Klaus Klein <kleink@reziprozitaet.de>
List: tech-userlevel
Date: 12/06/2002 23:20:26
Ignatios Souvatzis <is@netbsd.org> writes:

> Wouldn't a script expecting a standard-conforming cp expect that
> ``cp -v foo'' copies the file ``-v'' to the file ``foo'' ?

No.  A script expecting a 'restrictively' conforming cp would be
broken, since a conforming cp utility may well support additional
options.  Furthermore, a conforming cp utility shall conform to the
Utility Syntax Guidelines, which imply use of getopt() option parsing
(or getopt()-like behaviour), and therefore invoking the utility with
an unrecognized option character will usually result in an error.

What you'd be looking for, in this particular case, is ``cp -- -v
foo''.


- Klaus