sniper007 said:Hi!
I'm just curious why for most scripting sh language and not bash ? So when use bash and when sh for write some script ?
vermaden said:POSIX sh(1) is portable
Oko said:Korn Shell is excellent for scripting as well but there is the same issue of portability like with Bash.
Default shell on OpenBSD is OpenBSD version of public Korn Shell with custom OpenBSD patches.killasmurf86 said:AFAIK any script written in sh will work with mksh
However not all scripts written in mksh will work on sh, that because mksh has some extra features, that sh doesn't have..... However as I said before it's 100% sh backwards compatible.
Btw, isn't sh replaced with ksh (or was it mksh) in OpenBSD?
# echo $SHELL
/bin/ksh
$ echo $SHELL
/bin/ksh
$ more /etc/shells
# $OpenBSD: shells,v 1.8 2009/02/14 17:06:40 sobrado Exp $
#
# list of acceptable shells for chpass(1).
# ftpd(8) will not allow users to connect who are not using
# one of these shells, unless the user is listed in /etc/ftpchroot.
/bin/sh
/bin/csh
/bin/ksh
/usr/local/bin/bash
vermaden said:@sniper007
POSIX sh(1) is portable, you will be able to run these scripts on FreeBSD, AIX, Solaris, HP-UX, Linux and even CYGWIN under Windows [...]
vermaden said:@Graaf_van_Vlaanderen
Do not use (t)csh for scripting, have you ever tried [CMD=""]1> 2> 2>&1 1>&2[/CMD] redirections under (t)csh?
$ application 2> /dev/null &
% applicaction >& /dev/null &
Charles Cazabon, via http://home.xnet.com/~raven/Sysadmin/ASR.Quotes.htmlPerl isn't really a swiss army knife. That's more like C. Perl is a large, metallic toolbox containing:
-a complete set of box-end wrenches in metric and imperial, except 10mm and 3/8"
-a selection of five machinists' hammers
-one regular construction hammer
-ten- and twelve-pound sledgehammers
-complete set of Robertson screwdrivers
-and an infinite length of duct tape