Subject: Escaping doesn't work in yes

From: Olaf Bossen <[email-masked]>
Date: Tue, 11 Jan 2011 00:36:23 +0100

Hello there,

I have tried to output a string starting with '-' using the yes program.
The info page states:

"The only options are a lone `--help' or `--version'.  To output an
argument that begins with `-', precede it with `--', e.g., `yes --
--help'."

So I tried that and it doesn't work.

Cheers,
Olaf Bossen

$ yes '----help'
yes: invalid option -- '-'
Try `yes --help' for more information.

$ yes --version 
yes (GNU coreutils) 8.7
Packaged by Gentoo (8.7 (p1))
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.

I am running Gentoo 64 bit. Some more options:

CFLAGS="-O2 -pipe"
CXXFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
declare -x LANG="C"
declare -x LANGUAGE=""

glibc version:
glibc-2.11.2-r3