Simple question regarding touch and mv
Mikkel L. Ellertson
mikkel at infinity-ltd.com
Sun Dec 21 15:32:12 UTC 2008
Roger Heflin wrote:
>
>>>
>>
>> Don't some programs interpret -- as stdin?
>>
>>
>>
>
> No.
>
> But some programs do interpret -- as no more options after this.
>
> so:
>
> "touch -- -foo" will work as the -- tells touch that there are no
> options after this.
>
I think it works for almost all command line programs - probably all
the ones written in C. I believe it is build into the library
function that separates out options. ./-foo also works because you
are giving the path, so the - is not seen as an options. (./ = in
current directory.)
Mikkel
--
Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20081221/d662ea94/attachment-0001.sig>
More information about the fedora-list
mailing list