Thorsten Glaser <[email protected]> writes:
> Jari Aalto dixit:
>
>> That is an incorrect reasoning. The POSIX standard mandates ...
>> The shell scripts are executed in context of <file>. The POSIX standard
>> specifically requires the context to be a readabale in order to run the
>> instructions.
>
> Yes, but SUSv4 doesn’t say (or I could not find it) explicitly what
> to do with directories.
It doesn't say about many things: context of symlinks, block devices etc.
What is does say, as quoted:
http://www.opengroup.org/onlinepubs/009695399/utilities/cat.html
>> cat [-u][file ...]
EXIT STATUS
The following exit values shall be returned:
0
>> All input files were output successfully.
>0
An error occurred.
Does it not explicitly read <file> in all points?
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
SYNOPSIS
sh [-abCefhimnuvx][-o option][+abCefhimnuvx][+o option]
[command_file [argument...]]
Does it not explicitly read <command_file>?
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
2. Shell Command Language
This chapter contains the definition of the Shell Command Language.
>> 1. The shell reads its input from a file (see sh), from the -c
option or from the system() and popen() functions defined in the
System Interfaces volume of IEEE Std 1003.1-2001. If the first line
>> of a file of shell commands starts with the characters "#!", the
results are unspecified.
Does it not read <file> in all points?
>>It would be helpful to report this cat(1) bug to the OS you had used for
>>testing.
>
> mksh is part of MirBSD.
Then please use Debian when comparing the results, where programs are
brought forward to POSIX compliance.
> Please provide a better reasoning if you want this behaviour changed ☺
The POSIX standard is perfectly clear on this: it says <file> and that
word does not have intereptation you suggest.
Please bring mksh to follow the POSIX standard under Debian. mksh is a
Debian package, so the rules of POSIX apply here. A Debian specific
patch would be appropriate if mksh is ported elsewhere.
Jari
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]