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


Groups > gnu.bash.bug > #16447

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

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From L A Walsh <bash@tlinx.org>
Newsgroups gnu.bash.bug
Subject Re: problem with extra space; setting? cygwin only?
Date Tue, 23 Jun 2020 12:33:23 -0700
Lines 38
Approved bug-bash@gnu.org
Message-ID <mailman.344.1592940822.2574.bug-bash@gnu.org> (permalink)
References <CALOnQv4FDL97PJbsZBxKKqXvdfczPY_ROLpYLgjBaaXLXRfV8A@mail.gmail.com> <20200623192919.GJ19673@eeg.ccf.org> <CALOnQv6Q-eMfbAMjwErf8Nq9g0cOn+bi7QRu0JDfmfAkUGKjXA@mail.gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
X-Trace usenet.stanford.edu 1592940822 13872 209.51.188.17 (23 Jun 2020 19:33:42 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=jTJknrYIa9hs89rwLIZKOtiH8e2nvFvIT6O/AYWOjUM=; b=OWw9PCPIiQFf5WwVkVlRoOGOiaUjgngmjsbI34elIYG/+dmw4ZWV7/70upjat9vvFK MNCEm9pzOfL+y8Uoc+5Pzdo1FZBmQvra9vtYq8x5D/wv4hFV5zCvLnmmYIHFlgEd3Lj5 +wcaYo9LI3bk1MPu75GhBTnF6waZC6xhe96oryoZLoA1AYtqHtqO/DAaYYLwBLkgbbDm 3klura7rw0qYhplwr6qRfpAxFZYnA/JUrZKbZmX38VxlsVO0+POKQ042VVvQ8jsgthbT Ir65yQQF7eIKx4mpl7+lDo5dNS3eUuCXnuF3SDEKq8LEFYaurfF7IuEEgWfljh53XJup QN1Q==
X-Gm-Message-State AOAM5314Db7nRGoQMiIj9FYci0YSpAVUuTqBiOStHfCdSnUZv6tUxgwZ ervLqfucWdALcpJlGHTtYVTAP47hXz/6UedxpnLdx11xzRQ=
X-Google-Smtp-Source ABdhPJxTe4w5l69yRXLIMerEomxd1JBgI0KFoKT1WTBaRvOO7ZZFG8J7uZdDaM2lQKVcnFfL9kMaA1fyRDcJDSrFKnU=
X-Received by 2002:a05:6638:1409:: with SMTP id k9mr26323822jad.125.1592940817295; Tue, 23 Jun 2020 12:33:37 -0700 (PDT)
In-Reply-To <20200623192919.GJ19673@eeg.ccf.org>
Received-SPF softfail client-ip=209.85.166.49; envelope-from=gsuite@tlinx.org; helo=mail-io1-f49.google.com
X-detected-operating-system by eggs.gnu.org: First seen = 2020/06/23 15:33:37
X-ACL-Warn Detected OS = Linux 2.2.x-3.x [generic] [fuzzy]
X-Spam_score_int -21
X-Spam_score -2.2
X-Spam_bar --
X-Spam_report (-2.2 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=_AUTOLEARN
X-Spam_action no action
X-Content-Filtered-By Mailman/MimeDel 2.1.23
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <CALOnQv6Q-eMfbAMjwErf8Nq9g0cOn+bi7QRu0JDfmfAkUGKjXA@mail.gmail.com>
X-Mailman-Original-References <CALOnQv4FDL97PJbsZBxKKqXvdfczPY_ROLpYLgjBaaXLXRfV8A@mail.gmail.com> <20200623192919.GJ19673@eeg.ccf.org>
Xref csiph.com gnu.bash.bug:16447

Show key headers only | View raw


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.



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
>
> Or in other words, create the environment variable 'output' with content
> 'printf' in the temporary environment of the command "output", which is
> generated by the unquoted parameter expansion between the assignment
> and the %s:%s argument.
>
> Moreover, the error message you show is *not* the one generated by this
> command.
>
> unicorn:~$ set output
> unicorn:~$ output=""printf ${1:+-v $1} "%s:%s" 23 myproc
> bash: -v: command not found
>
> The unquoted parameter expansion ${1:+...} expands to the two words
> "-v" and "output", so you are attempting to run a command named "-v".
> Thus, the error that I showed.
>
> Either your email does not contain the actual command you're running,
> or you've misrepresented the error message it produces.  Or both.
>
>

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


Thread

Re: problem with extra space; setting? cygwin only? L A Walsh <bash@tlinx.org> - 2020-06-23 12:33 -0700

csiph-web