Re: strictly posix shell mode ?
- From: "Kaz Kylheku" <kkylheku@xxxxxxxxx>
- Date: 2 Nov 2006 11:50:52 -0800
Stephane CHAZELAS wrote:
2006-11-02, 08:25(-05), Barry Margolin:
[....]
That's not the right question to ask, I'd say.
What's the best way to confirm that a script is POSIX. POSIX
specifies both the shell behavior and also (and actually more
that) how a script should be written. (the script is refered to
as "an application" in POSIX).
I think the only way is to read the POSIX/SUS specification,
and to double check the script with that in hand.
And is that the same answer you'd give if someone asked how to check
whether your program has some other type of bug? Just double check it
by reading it?
I never said that. What I meant is that there was no tool
available to verify the conformance of a script to POSIX or SUS.
And writing such a tool would reveal a complicate task, given
that the shell syntax is not very rigorous, that it is
an interpreted language (can't use a lint type tool, you need to
execute the script to verify it), that the POSIX and SUS
specifications are subject to interpretations and have plenty of
blur/dark areas.
None of these arguments consitute an irrefutable objection against
developing or using a tool which catches a subset of all possible
errors.
In the abstract, the output of a checker is a tri-state value: program
bad/nonconforming, program good/conforming, or undecided. The undecided
state exists because of the dynamic aspects of the language: showing
that a program is free of errors runs into the halting problem.
However, just because the "undecided" output exists does not mean that
a checker is incapable of providing value to the developer.
.
- Follow-Ups:
- Re: strictly posix shell mode ?
- From: Jordan Abel
- Re: strictly posix shell mode ?
- References:
- strictly posix shell mode ?
- From: Yakov
- Re: strictly posix shell mode ?
- From: Jordan Abel
- Re: strictly posix shell mode ?
- From: Kaz Kylheku
- Re: strictly posix shell mode ?
- From: Jordan Abel
- Re: strictly posix shell mode ?
- From: Barry Margolin
- Re: strictly posix shell mode ?
- From: Stephane CHAZELAS
- Re: strictly posix shell mode ?
- From: Barry Margolin
- Re: strictly posix shell mode ?
- From: Stephane CHAZELAS
- strictly posix shell mode ?
- Prev by Date: Re: strictly posix shell mode ?
- Next by Date: Re: finding a string in another
- Previous by thread: Re: strictly posix shell mode ?
- Next by thread: Re: strictly posix shell mode ?
- Index(es):
Relevant Pages
|