bug-bash
[Top][All Lists]
Advanced

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

Re: 'for' builtin without 'in' doesn't use the positional parameter


From: Chet Ramey
Subject: Re: 'for' builtin without 'in' doesn't use the positional parameter
Date: Mon, 4 Nov 2002 16:07:22 -0500

> address@hidden wrote:
> > $ cat > foo.sh <<EOF
> >> for i
> >> do
> >> echo ">>>$i<<<"
> >> done
> >> EOF
> 
> $ cat foo.sh
> for i
> do
> echo ">>><<<"
> done

Paul has sharp eyes.  Unless the here document delimiter is quoted, variable
expansion will be performed on each line as the here document is written.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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