[Top][All Lists]

[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=""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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]