On Tue, Jul 08, 2008 at 08:44:47PM -0700, Mr Aras wrote:
[...]
> #!/bin/sh
> sh <<-EOF
> for word in hello world
> do
> echo word = $word
> done
> EOF
>
> output is:
> word =
> word =
>
>
> Can someone tell me why this doesn't work? I've been going nuts trying to
> figure this one out.
[
Hi,
I've been trying to do a "for loop" in a "here document" but the variable is
never assigned to the items in the list.
e.g.
#!/bin/sh
sh <<-EOF
for word in hello world
do
echo word = $word
done
EOF
output is:
word =
word =
Can someone tell me why this doesn't work? I've been going