[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bash-bug
Subject:    Re: empty lines at the end of quoted command subsitutions missing
From:       Chet Ramey <chet.ramey () case ! edu>
Date:       2010-07-24 15:22:21
Message-ID: 4C4B052D.9040401 () case ! edu
[Download RAW message or body]

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/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic