[Bash Scripting] About redirecting an output

Georg Sauthoff g_sauthoff at web.de
Sun Feb 25 11:06:46 UTC 2007


On 2007-02-25, Joel Bryan Juliano <joelbryan.juliano at gmail.com> wrote:

Hi,

> if your going to use #!/bin/sh, you need to explicitly define your syntax.

> for example in bash this is fine.

> if [ -z $MY_CONDITION ]; then
>  foo
> fi

> but in dash, it's not.
> you'll have to put the semicolon delimiter on every command.

really? Then dash is not IEEE Std 1003.1 compliant? Because
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_10
defines newline as a valid command separator.

Best regards
Georg Sauthoff





More information about the ubuntu-users mailing list