for loops with /bin/sh on command line.

Wojciech Puchar wojtek at wojtek.tensor.gdynia.pl
Sun Jul 8 16:51:08 UTC 2012


> am I suffering from too much use of bash and as such shouldnt expect it
> to work?
>
maybe. i actually use bash for script.


>
> banshee# for foo in 1 2 3 ; do echo $foo ; done
> for: Command not found.
> foo: Undefined variable.
> banshee# echo 'for foo in 1 2 3; do echo $foo ; done' > bahh.sh
> banshee# sh bahh.sh
> 1
> 2
> 3
> banshee#
>
>
>
> Vince
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>


More information about the freebsd-questions mailing list