help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: case $var in $list) issue


From: Greg Wooledge
Subject: Re: case $var in $list) issue
Date: Fri, 1 Nov 2024 15:55:23 -0400

On Fri, Nov 01, 2024 at 20:07:10 +0100, #!microsuxx wrote:
> ~ $ x="${array[*]}"
> ~ $ echo $x
> zero one two three four

You're still failing to quote.  echo "$x" is needed to have even the
slightest *chance* of seeing the correct output.

printf '%s\n' "$x" would guarantee seeing the correct output.  But for
debugging purposes, echo "$x" may be good enough, often enough.

echo $x, however, will never be acceptable.



reply via email to

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