Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16446
| 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:31:21 -0700 |
| Lines | 38 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.343.1592940698.2574.bug-bash@gnu.org> (permalink) |
| References | <CALOnQv4FDL97PJbsZBxKKqXvdfczPY_ROLpYLgjBaaXLXRfV8A@mail.gmail.com> <20200623192919.GJ19673@eeg.ccf.org> <CALOnQv41o-u3hgXkQB50Bn_5Jf8iRWM9ZQAOBS9JQKhPvi6O_g@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 1592940698 13790 209.51.188.17 (23 Jun 2020 19:31:38 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=vJzdPAXKBEuR2oUtN6A45egaldmDmYYL/bXeowVoB/c=; b=HOL1VNd88aKWptCYD+q74/PnNTGTEOE37Q8Xj5ov2qelKlj36j+92u+I+Oxh9uzzeD 52yj6iCDYGh7h+ripP967qcfCNYF5suOwYD9X8sxB95DJjTOzcb0qrs9SctsCHgmue2b Cs6eDXxDPWDhR9mkglKjfrUj/Y78C2LQZs7DnZ/7R6wpVLC9JTHzABJ9fYLZ+KsYGHIS lZnsqC1I3XJH2wvKqcv/P3QT6ymcs7n9b8V3aNOhTdMANAsYleLZqfN5oXVOxGoDGE5Y V1RxTPjidV41rmHD9Z96xEueSvANProji+7NVkG+p9EdxWc2L7r985HPaKYZlrDGfu9x A6+Q== |
| X-Gm-Message-State | AOAM531yIz/Np3KqLj1RnyPxCsW9xj9YuYDPrUBxh3baf0GEVd+5QUbo upKyq2cXwVAsG5JuXSlc3cfhU+XdopKrg1kgizgtCVew5wM= |
| X-Google-Smtp-Source | ABdhPJxBAMniuDtWXrTKBz3UEueO2KtzJKlUZoBaizDEPaeBYhxGIzTkflzfqxRS4K/gLuHOuigjqKp5eL4sMSIg2RQ= |
| X-Received | by 2002:a05:6638:12c7:: with SMTP id v7mr25351140jas.56.1592940695116; Tue, 23 Jun 2020 12:31:35 -0700 (PDT) |
| In-Reply-To | <20200623192919.GJ19673@eeg.ccf.org> |
| Received-SPF | softfail client-ip=209.85.166.53; envelope-from=gsuite@tlinx.org; helo=mail-io1-f53.google.com |
| X-detected-operating-system | by eggs.gnu.org: First seen = 2020/06/23 15:21:38 |
| 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 | <CALOnQv41o-u3hgXkQB50Bn_5Jf8iRWM9ZQAOBS9JQKhPvi6O_g@mail.gmail.com> |
| X-Mailman-Original-References | <CALOnQv4FDL97PJbsZBxKKqXvdfczPY_ROLpYLgjBaaXLXRfV8A@mail.gmail.com> <20200623192919.GJ19673@eeg.ccf.org> |
| Xref | csiph.com gnu.bash.bug:16446 |
Show key headers only | View raw
there was a linefeed in my source between output="" and the printf.
It's a gmail feature to mangle your input.
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
Re: problem with extra space; setting? cygwin only? L A Walsh <bash@tlinx.org> - 2020-06-23 12:31 -0700
csiph-web