[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Command name dequote does not work
From: |
Ralf Goertz |
Subject: |
Re: Command name dequote does not work |
Date: |
Tue, 15 Apr 2014 17:46:07 +0200 |
User-agent: |
KNode/4.11.5 |
Chet Ramey wrote:
> On 4/15/14, 3:32 AM, ingo.krabbe@eoa.de wrote:
>
>> Bash Version: 4.2
>> Patch Level: 37
>> Release Status: release
>>
>> Description:
>> I wrote a simple shell script using sed to convert \n into newlines and
>> other \\(.) to \\\1 and
>> called that script dequote. When I'm trying to call it nothing happens, when
>> I'm calling
>> $HOME/bin/dequote it works. There's no alias called dequote, there's no
>> other dequote in path.
>> When I rename the script and call it it just works as expected.
>>
>> This looks like a secret command, that just echos its arguments, as calling
>> "dequote xyz" echoes
>> "xyz".
>>
>> But having a secret alias or command is very evil. What's up here?
>>
>>
>> Repeat-By:
>> see above
>>
>> Fix:
>> Don't use secret commands. Any builtin has to be documented on the help page.
>
> Please. Run `type dequote' and see what it displays.
>
> You have access to the source code, you know; you could have checked
> whether or not there is a `secret command' named `dequote'.
>
I am not the OP but on OpenSuse 13.1 I have
$ type dequote
dequote is a function
dequote ()
{
eval printf %s "$1" 2> /dev/null
}
Ralf