bug-bash
[Top][All Lists]
Advanced

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

Re: echo builtin command will give the wrong value of the variable when


From: Greg Wooledge
Subject: Re: echo builtin command will give the wrong value of the variable when there is a file named: 11 in the current directory
Date: Wed, 27 Jul 2016 09:28:55 -0400
User-agent: Mutt/1.4.2.3i

On Wed, Jul 27, 2016 at 07:24:11PM +0800, Lingfei Kong wrote:
> # touch 11
> # c='[11761][1469504252]'
> # echo $c                
> 11

This is why you MUST ALWAYS quote your parameter expansions.

echo "$c"

http://mywiki.wooledge.org/Quotes
http://mywiki.wooledge.org/BashGuide



reply via email to

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