[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug with for in list, when list is empty
From: |
Francis Montagnac |
Subject: |
Re: bug with for in list, when list is empty |
Date: |
16 Jul 2001 10:34:35 GMT |
>Repeat-By:
> for i in ; do echo $i; done
> bash: syntax error near unexpected token `;'
A turnaround is to use an auxiliary variable for the list.
list=''
for i in $list ; do echo $i; done
You should perhaps explain in what context you fall on this.
--
Francis.Montagnac@sophia.inria.fr, Tel: (33) 04 92 38 79 11, Bur: E106
INRIA Sophia, 2004, rte des Lucioles, B.P.93 - 06902 Sophia Antipolis Cedex