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


Groups > gnu.bash.bug > #16443

problem with extra space; setting? cygwin only?

Path csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From L A Walsh <bash@tlinx.org>
Newsgroups gnu.bash.bug
Subject problem with extra space; setting? cygwin only?
Date Tue, 23 Jun 2020 12:21:24 -0700
Lines 26
Approved bug-bash@gnu.org
Message-ID <mailman.340.1592940103.2574.bug-bash@gnu.org> (permalink)
References <CALOnQv4FDL97PJbsZBxKKqXvdfczPY_ROLpYLgjBaaXLXRfV8A@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 1592940104 13372 209.51.188.17 (23 Jun 2020 19:21:44 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:from:date:message-id:subject:to; bh=miFMHLIVH1h3WEvr60NFDGe9l9AwlE0u3yNcmvE0wVA=; b=fAfZogzBJHwnTeJpq/JgfhJk5BSdyhDIfcDfNtA8X3gp4YePSg7iPRiTATfKyM0tXQ f0DcRfLn0goAKaAnrkpUBSTmlDY9bWD/eEIXl2oyA+eEK+jdZBTGeWS4bDWcwRucZYkp tFPM2WAXyS1gqRRSU1WCSNVcgQq+bXE/Q6v1FFcC+mmth22tOT4mu5fjQXtMWd8uLUZB DO7b62l2REDGddWYmEqdJkNGmSo5RzyE9I+Q3SkMpWs135+RVEask4/CAFqWtApP8g/A 28W3idSfpYzHyb9ysgQ5E5Rs8/be9pex7uJ+1IEBZq7hJVs6v0xrce0cxbTwyTZh9NLr M1Rg==
X-Gm-Message-State AOAM533mr6UAnxZLDIY4BM0k9YfcfL6LDgrtOhYlr6P/IOEHQF2QuIrD 6PqfekKekxN3h8/G1YpD6F2bs1tMAQRJZ510Tt5GFXOm
X-Google-Smtp-Source ABdhPJyE8WxLI0KEQqD2yG2IO+L0Grmh1eAoMya0l1EBhggzz9pX8UBhb4yBI1TRAKbSWeB/Ka24z5LaXxAguPIb7ZE=
X-Received by 2002:a02:c985:: with SMTP id b5mr26123857jap.22.1592940097691; Tue, 23 Jun 2020 12:21:37 -0700 (PDT)
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 <CALOnQv4FDL97PJbsZBxKKqXvdfczPY_ROLpYLgjBaaXLXRfV8A@mail.gmail.com>
Xref csiph.com gnu.bash.bug:16443

Show key headers only | View raw


I do:

set output
echo ">$1<"
>output<
output=""printf ${1:+-v $1} "%s:%s" 23 myproc



-Bash: printf: ` output': not a valid identifier



for some reason it is regarding the space before $1 in
the printf as part of the variable name.

It doesn't seem to do this on linux (lnx 4.4.12(3), cyg-4.4.12(1)).

If I remove the space it works on both linux and cygwin.

The manpage shows [-v var], as the syntax, but [-vVAR] works in both
places.  Is the manpage only correct sometimes?  Or is there some switch to
toggle this behavior that I don't know about?

Thanks!
-linda

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


Thread

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

csiph-web