[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problem with extra space; setting? cygwin only?
From: |
L A Walsh |
Subject: |
problem with extra space; setting? cygwin only? |
Date: |
Tue, 23 Jun 2020 12:21:24 -0700 |
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
- problem with extra space; setting? cygwin only?,
L A Walsh <=
- Re: problem with extra space; setting? cygwin only?, Greg Wooledge, 2020/06/23
- Re: problem with extra space; setting? cygwin only?, L A Walsh, 2020/06/23
- Re: problem with extra space; setting? cygwin only?, L A Walsh, 2020/06/23
- Re: problem with extra space; setting? cygwin only?, Eli Schwartz, 2020/06/23
- Re: problem with extra space; setting? cygwin only?, L A Walsh, 2020/06/23
- Re: problem with extra space; setting? cygwin only?, Dale R. Worley, 2020/06/24
- Re: problem with extra space; setting? cygwin only?, L A Walsh, 2020/06/25
- Re: problem with extra space; setting? cygwin only?, Greg Wooledge, 2020/06/25
- Re: problem with extra space; setting? cygwin only?, Robert Elz, 2020/06/25
- Re: problem with extra space; setting? cygwin only?, Greg Wooledge, 2020/06/23