Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16443 > unrolled thread
| Started by | L A Walsh <bash@tlinx.org> |
|---|---|
| First post | 2020-06-23 12:21 -0700 |
| Last post | 2020-06-23 12:21 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
problem with extra space; setting? cygwin only? L A Walsh <bash@tlinx.org> - 2020-06-23 12:21 -0700
| From | L A Walsh <bash@tlinx.org> |
|---|---|
| Date | 2020-06-23 12:21 -0700 |
| Subject | problem with extra space; setting? cygwin only? |
| Message-ID | <mailman.340.1592940103.2574.bug-bash@gnu.org> |
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 top | Article view | gnu.bash.bug
csiph-web