for loops with /bin/sh on command line.

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


>
>
> 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#
>
echo $SHELL
is it /bin/sh really?


More information about the freebsd-questions mailing list