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


Groups > gnu.bash.bug > #16450

Re: problem with extra space; setting? cygwin only?

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: problem with extra space; setting? cygwin only?
Date 2020-06-23 16:19 -0400
Organization ITS, Case Western Reserve University
Message-ID <mailman.348.1592943578.2574.bug-bash@gnu.org> (permalink)
References <CALOnQv4FDL97PJbsZBxKKqXvdfczPY_ROLpYLgjBaaXLXRfV8A@mail.gmail.com> <733e1f0e-deda-6c32-55a1-e6e1bb7406b7@case.edu>

Show all headers | View raw


On 6/23/20 3:21 PM, L A Walsh wrote:
> I do:
> 
> set output
> echo ">$1<"
>> output<
> output=""printf ${1:+-v $1} "%s:%s" 23 myproc
> 
> 
> 
> -Bash: printf: ` output': not a valid identifier

It looks like word splitting on the result of ${1:+-v $1} isn't taking
place. That might be due to IFS; or because this isn't an accurate
representation of your actual script, which includes quoting; or because
the character between the `v' and `$' isn't a space.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

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


Thread

Re: problem with extra space; setting? cygwin only? Chet Ramey <chet.ramey@case.edu> - 2020-06-23 16:19 -0400

csiph-web