bug-bash
[Top][All Lists]
Advanced

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

Re: syntax error near unexpected token `time'


From: Chet Ramey
Subject: Re: syntax error near unexpected token `time'
Date: Sun, 14 Dec 2014 21:12:04 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 12/14/14 11:44 AM, Andre Majorel wrote:
> Funny one :
> 
>   $ bash -c 'echo a | time cat'
>   a
>   [/usr/bin/time output deleted]
> 
> On the other hand :
> 
>   $ bash -c 'echo a |
>   time cat'
>   bash: -c: line 1: syntax error near unexpected token `time'
>   bash: -c: line 1: `time cat'
>   [$PS2 deleted]

Yes, `time' should not be recognized as a reserved word in this case, even
though the previous token is a newline.  I'll take a look at it.  Thanks
for the report.

Chet

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



reply via email to

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