bug-bash
[Top][All Lists]
Advanced

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

Re: corrupted input after size function (input that's not recorded by ba


From: Linda Walsh
Subject: Re: corrupted input after size function (input that's not recorded by bash)
Date: Sun, 16 Jun 2013 23:32:04 -0700
User-agent: Thunderbird



Dave Gibson wrote:
Trial and error suggests it's something to do with new-style command
substitution.  Try backticks:

    local s=`stty size`
----
        Yes... you are right.  This works... while
        local s=$(stty size) does not.

That's icky!  I thought they were identical, they appear not
to be...umm

Chet???  Hello?  Um... why are these not the same?

local s=`stty size`
local s=$(stty size)

the latter seems to eat a param or similar when used in a function
at an input prompt...now I wonder what other side effects "$()" has over "``"



showsize()
{
  local o="(${LINES}x${COLUMNS})" ; local s="${o//?/\\b}" ; printf "$o$s"
}
---
Well ain't that sweet.  I thought I tried that at one point, though,
and they weren't updating hmmm...proof's in the pudding, I suppose..




reply via email to

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