Re: strictly posix shell mode ?
2006-11-01 <1162415665.951538.186790@m73g2000cwd.googlegroups .com>,
Yakov wrote:
> I'm looking for the flag (in bash or ksh or zsh) that disables all
> extensions above posix and make shell strictly posix-compliant
> (without any additions).
>
> I found '--posix' flag of bash, but it's something different:
> it doesn't seem to disable bash-specific extensions. It
> "Changes the behavior of bash where the default operation *differs*
> from the POSIX". For example, the ((...)) construct is still
> interpreted
> with --posix.
>
> So, is there "restrict to posix" flag to bash/ksg/zsh ? (I don't have
> ash)
Why do you want this? As long as your script doesn't use extensions,
it'll run just fine with or without them enabled. ...or are you trying
to test your script for posix-compliance by trial and error? don't do
that. that's not the way to write a good script.
|