Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16443
| From | L A Walsh <bash@tlinx.org> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | problem with extra space; setting? cygwin only? |
| Date | 2020-06-23 12:21 -0700 |
| Message-ID | <mailman.340.1592940103.2574.bug-bash@gnu.org> (permalink) |
| References | <CALOnQv4FDL97PJbsZBxKKqXvdfczPY_ROLpYLgjBaaXLXRfV8A@mail.gmail.com> |
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
problem with extra space; setting? cygwin only? L A Walsh <bash@tlinx.org> - 2020-06-23 12:21 -0700
csiph-web