[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
syntax error near unexpected token `time'
From: |
Andre Majorel |
Subject: |
syntax error near unexpected token `time' |
Date: |
Sun, 14 Dec 2014 17:44:18 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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]
Dash, ksh and zsh accept either form.
That was with Bash 4.2.37. If it's been fixed in a later
version, sorry for the noise.
--
André Majorel http://www.teaser.fr/~amajorel/
- syntax error near unexpected token `time',
Andre Majorel <=