bug-bash
[Top][All Lists]
Advanced

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

Re: empty lines at the end of quoted command subsitutions missing


From: Chet Ramey
Subject: Re: empty lines at the end of quoted command subsitutions missing
Date: Sat, 24 Jul 2010 11:22:21 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1

On 7/24/10 3:23 AM, Andreas Schwab wrote:
> koenig@science-computing.de writes:
> 
>> empty line(s) at the end of quoted command subsitutions are missing:
> 
> That is not a bug, but a feature.  Command subsitution generally strips
> trailing newlines from the output of the command.  If you want the
> complete output use a pipe.

This is one of the reasons I added `printf -v' to supplement v=$(command).

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



reply via email to

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