bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coreutils-6.9] multiple utilities not handling escape char(\) prope


From: Andreas Schwab
Subject: Re: [coreutils-6.9] multiple utilities not handling escape char(\) properly when used with -, instead interpreting as option(could be a bash bug?)
Date: Tue, 17 Jul 2007 18:44:00 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux)

"Wilber Washbucket" <address@hidden> writes:

> ClarkConnect Community Edition release 4.0 (kernel 2.6.9-42.cc)
>
> I compiled the latest coreutils from source. Then I ran these series of 
> commands:
> coreutils-6.9]# mkdir testdir
> coreutils-6.9]# cd testdir/
> testdir]# ../src/touch +foo0
> testdir]# ../src/touch \+foo1
> testdir]# ../src/touch -bar0
> ../src/touch: invalid option -- e
> Try `../src/touch --help' for more information.
> ^^ That error is correct as the - char is used for options.

That is a variant of question 11 in the coreutils FAQ.

<http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#How-do-I-remove-files-that-start-with-a-dash_003f>

> testdir]# ../src/touch \-bar1
> ../src/touch: invalid option -- e
> Try `../src/touch --help' for more information.
> ^^ This is wrong, this should work!!

The backslash has been removed by the shell before the touch command has
seen it.  Try prefixing all your tries with echo to seen the actual
command line that is executed.

Btw., when I try to execute that command, I get a different error:

../src/touch: invalid option -- b
Try `../src/touch --help' for more information.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]