Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16448

Re: problem with extra space; setting? cygwin only?

From Eli Schwartz <eschwartz@archlinux.org>
Newsgroups gnu.bash.bug
Subject Re: problem with extra space; setting? cygwin only?
Date 2020-06-23 15:41 -0400
Message-ID <mailman.345.1592941295.2574.bug-bash@gnu.org> (permalink)
References <CALOnQv4FDL97PJbsZBxKKqXvdfczPY_ROLpYLgjBaaXLXRfV8A@mail.gmail.com> <20200623192919.GJ19673@eeg.ccf.org> <CALOnQv6Q-eMfbAMjwErf8Nq9g0cOn+bi7QRu0JDfmfAkUGKjXA@mail.gmail.com> <17a714e4-9c8a-4ddd-9989-4af40b686cd2@archlinux.org>

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 6/23/20 3:33 PM, L A Walsh wrote:
> On Tue, Jun 23, 2020 at 12:30 PM Greg Wooledge <wooledg@eeg.ccf.org> wrote:
> 
>> On Tue, Jun 23, 2020 at 12:21:24PM -0700, L A Walsh wrote:
>>> set output
>>> output=""printf ${1:+-v $1} "%s:%s" 23 myproc
>>> -Bash: printf: ` output': not a valid identifier
>>
>> Your command is simply wrong.  You've got two double-quotes in a row,
>> which simply cancel each other out, as they contain only the empty
>> string.  So, you are running this:
>>
>> output=printf   ${1:+-v $1}   %s:%s   23   myproc

> It's a gmail feature to mangle your input in weird ways when you
> cut/paste.
> the line with 'output=""' is separate from the "printf" line.  Sorry.

Why would you use their incompetent webmail if you know it is broken?


Be that as it may, I can trivially reproduce your error by destroying my
own $IFS

$ output="" IFS=/
$ set output
$ printf ${1:+-v $1} "%s:%s" 23 myproc
bash: printf: ` output': not a valid identifier


-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: problem with extra space; setting? cygwin only? Eli Schwartz <eschwartz@archlinux.org> - 2020-06-23 15:41 -0400

csiph-web