for loops with /bin/sh on command line.
I'm sure I'm being dim, but why cant I do a for loop on the command line using /bin/sh ? am I suffering from too much use of bash and as such shouldnt expect it to work? 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@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: for loops with /bin/sh on command line.
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@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: for loops with /bin/sh on command line.
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? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: for loops with /bin/sh on command line.
On 08/07/2012 17:51, Wojciech Puchar wrote: 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? Doh, yes that was it. Cant believe I forgot to check. I was running csh for no good reason. Thanks, Vince ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: for loops with /bin/sh on command line.
3 banshee# echo $SHELL is it /bin/sh really? Doh, yes that was it. Cant believe I forgot to check. I was running csh for no good reason. the reason is that it is default. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org