[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: input redirection fails on loop commands when positioned before comm
From: |
Chet Ramey |
Subject: |
Re: input redirection fails on loop commands when positioned before command invocation |
Date: |
Mon, 19 Jul 2004 09:37:47 -0400 |
> Machine Type: i686-pc-cygwin
>
> Bash Version: 2.05b
> Patch Level: 0
> Release Status: release
>
> Description:
> [Detailed description of the problem, suggestion, or complaint.] =
>
> An input redirection placed before the loop construct fails, while the =
> same redirection placed behind succeeds. Same happens on Sun Solaris 8 =
> (sun4u) with bash 2.03.0(1)-release (sparc-sun-solaris) and even with =
> the original bourne shell.
>
> Repeat-By:
> [Describe the sequence of events that causes the problem to =
> occur.]
> < /etc/motd while read a b;do echo $a $b;done
> bash: syntax error near unexpected token `do'
Please read the bash FAQ, question F5.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Live...Laugh...Love
Chet Ramey, ITS, CWRU chet@po.cwru.edu http://tiswww.tis.cwru.edu/~chet/