Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

big brother forbid me to run sh script

74 views
Skip to first unread message

Harry

unread,
Nov 18, 2016, 2:27:28 PM11/18/16
to
I am trying to run the following cmd on RedHat Linux.

$ printf "my_user_id\nthis_domain\bmy_password\n"|si_peek server:eso id:98651424 > 98651424.txt
*** forbidden command: printf

My Unix team is a big brother and they restrict us from using a lot of Unix commands. si_peek (application software for my team) is one of the cmds allowed, but not printf, sh, etc.

I tried to replace printf with echo, and the later was allowed.
But the generated output file has zero byte size, meaning I didn't get it right.

$ echo "my_user_id\nthis_domain\bmy_password\n"
my_user_id\nthis_domain\bmy_password\n

I need the output to be
my_user_id
this_domain
my_password

before piping it to si_peek.

A second issue is that I want to run the same cmd many times,
each with a different id.

So, I am tempting to write a shell script on my PC with cygwin,
which would generate the multiple cmds on PC, before I copy-n-paste
them to RedHat.

Cygwin prompt:
$ cat xx
CQM_ID=`cat<<EOL
98651424
98651425
98651469
98651470
98651681
98651682
98651695
98651727
98651728
98651753
98651754
98651772
98651773
98651812
98651813
EOL`
USER=my_user_id
DOMAIN=prod
PW=my_password
for id in `echo $CQM_ID`
do
printf "printf \"$USER\\n$DOMAIN\\n$PW\\n\\"\|si_peek server:eso $id \> $id.txt \\n"
done

$ sh xx
xx: line 23: unexpected EOF while looking for matching `"'
xx: line 26: syntax error: unexpected end of file

Please help with the cygwin script replacing printf with echo.

TIA

Kaz Kylheku

unread,
Nov 18, 2016, 2:32:59 PM11/18/16
to
On 2016-11-18, Harry <harryoo...@hotmail.com> wrote:
> $ echo "my_user_id\nthis_domain\bmy_password\n"
> my_user_id\nthis_domain\bmy_password\n
>
> I need the output to be
> my_user_id
> this_domain
> my_password
>
> before piping it to si_peek.

(echo line1; echo line2; echo line3) | si_peek

Rakesh Sharma

unread,
Nov 18, 2016, 6:21:44 PM11/18/16
to
First do away with the heredoc in the cat command. It's not helping to obfuscate things here. For example, just declare the CQM_ID variable this way:

CQM_ID='
4534565
6686834
...
'

Then instead of shoving everything inside the printf statement which likely leads to backslashitis, perform the operation in a template-oriented manner.

Note that in your printf statement there is one missing backslash.

TEMPLATE="echo '$USER
$DOMAIN
$PW
'|si_peek server:eso \$id > \$id.txt"

for id in $CQM_ID
do
eval "
cmd=\"$TEMPLATE\"
"
#echo "$cmd"
eval "$cmd"
done

maso...@gmail.com

unread,
Nov 18, 2016, 11:27:40 PM11/18/16
to
On Friday, November 18, 2016 at 3:21:44 PM UTC-8, Rakesh Sharma wrote:

> First do away with the heredoc in the cat command. It's not helping to obfuscate things here. For example, just declare the CQM_ID variable this way:
>
> CQM_ID='
> 4534565
> 6686834
> ...
> '
>
> Then instead of shoving everything inside the printf statement which likely leads to backslashitis, perform the operation in a template-oriented manner.
>
> Note that in your printf statement there is one missing backslash.
>
> TEMPLATE="echo '$USER
> $DOMAIN
> $PW
> '|si_peek server:eso \$id > \$id.txt"
>
> for id in $CQM_ID
> do
> eval "
> cmd=\"$TEMPLATE\"
> "
> #echo "$cmd"
> eval "$cmd"
> done

On Windows Cygwin prompt:
$ cat xx
CQM_ID='
98651424
98651425
98651469
98651470
98651681
98651682
98651695
98651727
98651728
98651753
98651754
98651772
98651773
98651812
98651813
'
USER=my_id
DOMAIN=prod
PW=mypassword
TEMPLATE="echo '$USER
$DOMAIN
$PW
'|si_peek server:eso \$id > \$id.txt"

for id in $CQM_ID
do
eval "
cmd=\"$TEMPLATE\"
"
#echo "$cmd"
eval "$cmd"
done


Hmmm... I got these errors ...
Of course si_peek does not exist on my Windows PC.
It only exists on the Red Hat Linux box.

$ sh xx
xx: line 35: si_peek: command not found
xx: line 35: si_peek: command not found
...

So, the Cygwin script needs to generate the 15 cmds similar to this one below.

echo -e "my_user_id\nthis_domain\nmy_password\n"|si_peek server:eso id:98651424 > 98651424.txt

I could not use this script on the Red Hat Linix box, and my big brother
forbids me to use sh or bash. I have a restricted shell there.

maso...@gmail.com

unread,
Nov 18, 2016, 11:35:36 PM11/18/16
to
Ahhh...

I changed
eval "$cmd"
to
echo "$cmd"
, and I got the 15 cmds on my Cygwin prompt.

Thanks a lot, Rakeswh :-)

Eric Pozharski

unread,
Nov 19, 2016, 1:33:46 PM11/19/16
to
Stop spreading FUD:

{2379:3} [0:0]% bash
{0:1} [0:0]$ echo "abc\ndef\nghi"
abc\ndef\nghi
{9:2} [0:0]$ echo -e "abc\ndef\nghi"
abc
def
ghi
{15:3} [0:0]$ exit

Or zsh.

--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom

Janis Papanagnou

unread,
Nov 19, 2016, 1:50:00 PM11/19/16
to
On 19.11.2016 14:19, Eric Pozharski wrote:
> with <201611181...@kylheku.com> Kaz Kylheku wrote:
>> On 2016-11-18, Harry <harryoo...@hotmail.com> wrote:
>
>>> $ echo "my_user_id\nthis_domain\bmy_password\n"
>>> my_user_id\nthis_domain\bmy_password\n
>>>
>>> I need the output to be
>>> my_user_id
>>> this_domain
>>> my_password
>>>
>>> before piping it to si_peek.
>> (echo line1; echo line2; echo line3) | si_peek
>
> Stop spreading FUD:
>
> {2379:3} [0:0]% bash
> {0:1} [0:0]$ echo "abc\ndef\nghi"
> abc\ndef\nghi
> {9:2} [0:0]$ echo -e "abc\ndef\nghi"
> abc
> def
> ghi
> {15:3} [0:0]$ exit
>
> Or zsh.

Or just use printf (and also be POSIX compliant).

Janis

Kaz Kylheku

unread,
Nov 19, 2016, 2:41:32 PM11/19/16
to
On 2016-11-19, Eric Pozharski <why...@pozharski.name> wrote:
> with <201611181...@kylheku.com> Kaz Kylheku wrote:
>> On 2016-11-18, Harry <harryoo...@hotmail.com> wrote:
>
>>> $ echo "my_user_id\nthis_domain\bmy_password\n"
>>> my_user_id\nthis_domain\bmy_password\n
>>>
>>> I need the output to be
>>> my_user_id
>>> this_domain
>>> my_password
>>>
>>> before piping it to si_peek.
>> (echo line1; echo line2; echo line3) | si_peek
>
> Stop spreading FUD:

Go fuck yourself.

Edit that: go look up what FUD actually means, then go fuck yourself.

> {2379:3} [0:0]% bash
> {0:1} [0:0]$ echo "abc\ndef\nghi"
> abc\ndef\nghi
> {9:2} [0:0]$ echo -e "abc\ndef\nghi"

That's a GNU extension that I didn't assume OP could use.

(Given that even printf doesn't work, a POSIX feature).

The extension is non-conforming. Quote from Single Unix Spec, Issue 8:

The echo utility shall not recognize the "--" argument in the manner
specified by Guideline 10 of XBD Utility Syntax Guidelines; "--"
shall be recognized as a string operand.

Implementations shall not support any options.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


> or zsh

Yeah, *that* will work around the problem of a locked down environment
that has no printf!

Kaz Kylheku

unread,
Nov 19, 2016, 2:47:18 PM11/19/16
to
OP> $ printf "my_user_id\nthis_domain\bmy_password\n"|si_peek server:esoid:98651424
OP> *** forbidden command: printf

Kenny McCormack

unread,
Nov 19, 2016, 2:48:51 PM11/19/16
to
In article <201611191...@kylheku.com>,
Or find your sysadmin and think about the 2nd Amendment...

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain in
compliance with said RFCs, the actual sig can be found at the following web address:
http://www.xmission.com/~gazelle/Sigs/RightWingMedia

Janis Papanagnou

unread,
Nov 19, 2016, 3:52:01 PM11/19/16
to
Ah, yes. (Horrible!)

(With ksh you'd have it as built-in but I suppose in the OP's pathological
environment you also have no ksh.)

Janis

Thomas 'PointedEars' Lahn

unread,
Nov 20, 2016, 8:01:34 AM11/20/16
to
Eric Pozharski wrote:

> with <201611181...@kylheku.com> Kaz Kylheku wrote:
>> On 2016-11-18, Harry <harryoo...@hotmail.com> wrote:
>>> $ echo "my_user_id\nthis_domain\bmy_password\n"
>>> my_user_id\nthis_domain\bmy_password\n
>>>
>>> I need the output to be
>>> my_user_id
>>> this_domain
>>> my_password
>>>
>>> before piping it to si_peek.
>> (echo line1; echo line2; echo line3) | si_peek
>
> Stop spreading FUD:

It is not that. You should look up the meaning of the acronym, and
apologize.

> {2379:3} [0:0]% bash
> {0:1} [0:0]$ echo "abc\ndef\nghi"
> abc\ndef\nghi
> {9:2} [0:0]$ echo -e "abc\ndef\nghi"
> abc
> def
> ghi
> {15:3} [0:0]$ exit

This is comp.unix.shell. _G_NU’s _N_ot _U_nix¹ ;-)

> Or zsh.

With no environment specified, we (must) assume the POSIX shell and POSIX
utilities here (for maximum compatibility). “-e” is a GNU extension to
“echo”; you should not rely on that, but use the standards-compliant and
compatible “printf” command instead. However, “printf” is explicitly
forbidden in the OP’s setup.

<http://pubs.opengroup.org/onlinepubs/9699919799/>

______
¹ <https://en.wikipedia.org/wiki/GNU>
--
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

Aragorn

unread,
Nov 20, 2016, 9:19:38 AM11/20/16
to
On Sunday 20 Nov 2016 14:01, Thomas 'PointedEars' Lahn conveyed the
following to comp.unix.shell...

> This is comp.unix.shell. _G_NU’s _N_ot _U_nix¹ ;-)
>
> ______
> ¹ <https://en.wikipedia.org/wiki/GNU>

GNU/Linux *is* UNIX. Inspur K-UX is a GNU/Linux distribution which has
been certified by the Open Group for use of the UNIX™ trademark.

--
= Aragorn =

Eric Pozharski

unread,
Nov 20, 2016, 1:33:33 PM11/20/16
to
with <201611191...@kylheku.com> Kaz Kylheku wrote:
> On 2016-11-19, Eric Pozharski <why...@pozharski.name> wrote:

*SKIP*
>> {9:2} [0:0]$ echo -e "abc\ndef\nghi"
> That's a GNU extension that I didn't assume OP could use.
> (Given that even printf doesn't work, a POSIX feature).

I'm glad I don't know RedHat (what allows dropping options of builtins;
what would be nice selling point, if you think about it). I regret
commenting. My apologies.

*CUT*

Joerg.S...@fokus.fraunhofer.de

unread,
Nov 21, 2016, 5:16:47 AM11/21/16
to
In article <o0sbcj$2qb$1...@dont-email.me>,
Are you shure?

1) There are plenty of big problems with various GNU userland tools
that prevent a certification. See e.g.:
https://personal.opengroup.org/~ajosey/tr22-07-2004.txt

2) Even the kernel is full of deviations. Check e.g. the behavior
of the waitid() call in Linux. It returns only 8 bits from
the exit code.

3) A shell/echo implementation that does not implement the XSI enhancements
could only be certified as an embedded platform.

So did you check the state?

--
EMail:jo...@schily.net (home) Jörg Schilling D-13353 Berlin
joerg.s...@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.org/private/ http://sourceforge.net/projects/schilytools/files/

Joerg.S...@fokus.fraunhofer.de

unread,
Nov 21, 2016, 5:26:42 AM11/21/16
to
In article <201611191...@kylheku.com>,
Kaz Kylheku <221-50...@kylheku.com> wrote:
What kind of shell is that?

All major recent shell implementations include printf as a builtin command.

Some of these printf implementations have major implementation bugs (they may
e.g. not support "printf 'a\0b'" or "printf '%b' 'a\0b'" correctly) but the
simple \n should be supported by all major implementations.

OK, ksh88 and mksh do not include printf, but bash, bosh, dash, ksh93, zsh
include it.

P.S.: bosh is the maintained version of the Bourne Shell.

Aragorn

unread,
Nov 21, 2016, 6:15:31 AM11/21/16
to
On Monday 21 Nov 2016 11:16, Joerg.S...@fokus.fraunhofer.de
conveyed the following to comp.unix.shell...

> In article <o0sbcj$2qb$1...@dont-email.me>,
> Aragorn <thor...@telenet.be.invalid> wrote:
>
>> On Sunday 20 Nov 2016 14:01, Thomas 'PointedEars' Lahn conveyed the
>> following to comp.unix.shell...
>>
>>> This is comp.unix.shell. _G_NU’s _N_ot _U_nix¹ ;-)
>>>
>>> ______
>>> ¹ <https://en.wikipedia.org/wiki/GNU>
>>
>> GNU/Linux *is* UNIX. Inspur K-UX is a GNU/Linux distribution which
>> has been certified by the Open Group for use of the UNIXâ„¢
>> trademark.
>
> Are you shure?
>
> 1) There are plenty of big problems with various GNU userland tools
> that prevent a certification. See e.g.:
> https://personal.opengroup.org/~ajosey/tr22-07-2004.txt

Most GNU userland tools have a POSIX-compatibility mode, even if that is
not their default mode of operation.

> 2) Even the kernel is full of deviations. Check e.g. the behavior
> of the waitid() call in Linux. It returns only 8 bits from
> the exit code.

The source code of the kernel is GPL'd, which means that the
distribution vendor can patch the code. They have to build it from
sources either way, because Linus Torvalds does not release the kernel
as a binary image.

> 3) A shell/echo implementation that does not implement the XSI
> enhancements could only be certified as an embedded platform.
>
> So did you check the state?

Inspur K-UX 2.0 and (the x86-64 version of) 3.0 are listed at the
website of The Open Group as compliant with the Single UNIX
Specification and thus certified for use of the UNIX trademark...:

http://www.opengroup.org/openbrand/register/brand3617.htm

And it definitely _is_ GNU/Linux. RedHat-based, even...:

https://en.wikipedia.org/wiki/Inspur_K-UX

--
= Aragorn =

Joerg.S...@fokus.fraunhofer.de

unread,
Nov 21, 2016, 6:47:13 AM11/21/16
to
In article <o0ukvd$5hs$1...@dont-email.me>,
Aragorn <thor...@telenet.be.invalid> wrote:

>> 1) There are plenty of big problems with various GNU userland tools
>> that prevent a certification. See e.g.:
>> https://personal.opengroup.org/~ajosey/tr22-07-2004.txt
>
>Most GNU userland tools have a POSIX-compatibility mode, even if that is
>not their default mode of operation.

If this was true, it would be possible to compile them POSIX compliant. As you
can read in https://personal.opengroup.org/~ajosey/tr22-07-2004.txt, POSIX
compatibility is not intended. So please explain us how they did certify and
what tools they did use as a replacement for the GNU tools?

Hint: I needed a POSIX compliant patch(1) implementation for OpenSolaris and
the only solution was to take the latest sources from Larry Wall (to get a free
license) and implement POSIX compliance from scratch. GNU patch is definitely
not POSIX compliant - even with POSIXLY_CORRECT set.

>> 2) Even the kernel is full of deviations. Check e.g. the behavior
>> of the waitid() call in Linux. It returns only 8 bits from
>> the exit code.
>
>The source code of the kernel is GPL'd, which means that the
>distribution vendor can patch the code. They have to build it from
>sources either way, because Linus Torvalds does not release the kernel
>as a binary image.

So let us see what happens, currently the Linux kernel guys reject ro implement
POSIX compliance and the RedHat "Cygwin" guys claim that Cygwin us bug by bug
compatible to Linux :-(

BTW: The FreeBSD people did need less than a day to fix a similar bug in their
kernel and NetBSD did need aprox. a month.

As the certification has been given in February 2016, this may habe been an
accident as the certification software is known to be incorrect until
August/September 2015.

>> 3) A shell/echo implementation that does not implement the XSI
>> enhancements could only be certified as an embedded platform.
>>
>> So did you check the state?
>
>Inspur K-UX 2.0 and (the x86-64 version of) 3.0 are listed at the
>website of The Open Group as compliant with the Single UNIX
>Specification and thus certified for use of the UNIX trademark...:
>
> http://www.opengroup.org/openbrand/register/brand3617.htm
>
>And it definitely _is_ GNU/Linux. RedHat-based, even...:
>
> https://en.wikipedia.org/wiki/Inspur_K-UX

If they did really receive a certification, they would need to have a "sh" that
by default behaves the way "echo" is described in the standard and this would
explude the availability of options and "--" support for echo(1).

Did you verify this for Inspur K-UX 2.0?

Aragorn

unread,
Nov 21, 2016, 7:44:19 AM11/21/16
to
On Monday 21 Nov 2016 12:47, Joerg.S...@fokus.fraunhofer.de
conveyed the following to comp.unix.shell...

> In article <o0ukvd$5hs$1...@dont-email.me>,
> Aragorn <thor...@telenet.be.invalid> wrote:
>
>>> 1) There are plenty of big problems with various GNU userland tools
>>> that prevent a certification. See e.g.:
>>> https://personal.opengroup.org/~ajosey/tr22-07-2004.txt
>>
>> Most GNU userland tools have a POSIX-compatibility mode, even if that
>> is not their default mode of operation.
>
> If this was true, it would be possible to compile them POSIX
> compliant.

There's no need to recompile them. You can run most of them in strict
POSIX compliance mode by way of the invocation of parameters.

> As you can read in
> https://personal.opengroup.org/~ajosey/tr22-07-2004.txt,
> POSIX compatibility is not intended.

GNU proper ─ i.e. GNU/Hurd ─ aims for POSIX compatibility, as stated on
their website, and that's the complete GNU operating system, kernel plus
userland. Linux, the kernel developed by Linus Torvalds and friends,
also aims for POSIX compliance. Therefore, one can safely say that
GNU/Linux "aims for POSIX compliance".

I will repeat that just because something does not run in strict POSIX-
compliance mode by default, doesn't mean that it cannot be made to do
so.

Furthermore, I would also like to draw your attention onto the fact that
POSIX is a standard while UNIX is a trademark, and that the POSIX
standard is _a superset of_ the Single UNIX Specification.

Validation for compliance with the Single UNIX Specification ─ and by
consequence, certification for use of the UNIX trademark ─ is the issue
of this sub-discussion.

> So please explain us how they did certify and what tools they did use
> as a replacement for the GNU tools?

That is not for me to explain. If you must absolutely know, then why
don't you send an e-mail to either The Open Group or Inspur and ask
them?

The Inspur K-UX distribution is RedHat-based, so I strongly suspect that
most of their userland will be built from the sources RedHat is using.

>>> 2) Even the kernel is full of deviations. Check e.g. the behavior
>>> of the waitid() call in Linux. It returns only 8 bits from
>>> the exit code.
>>
>> The source code of the kernel is GPL'd, which means that the
>> distribution vendor can patch the code. They have to build it from
>> sources either way, because Linus Torvalds does not release the
>> kernel as a binary image.
>
> So let us see what happens, currently the Linux kernel guys reject ro
> implement POSIX compliance and the RedHat "Cygwin" guys claim that
> Cygwin us bug by bug compatible to Linux :-(

Cygwin is not GNU/Linux, no matter what RedHat claims. It's a GNU
compatibility layer on top of Microsoft Windows.

Microsoft Windows does not support UNIX/POSIX, and the Microsoft NTFS
filesystem most certainly isn't UNIX/POSIX-compliant. I therefore fail
to see how Cygwin could be equated to an actual GNU/Linux system.

> BTW: The FreeBSD people did need less than a day to fix a similar bug
> in their kernel and NetBSD did need aprox. a month.
>
> As the certification has been given in February 2016, this may habe
> been an accident as the certification software is known to be
> incorrect until August/September 2015.

I'm sure The Open Group will appreciate it then that you point out to
them that their SUS validation test is incorrect, Jörg. :)

>>> 3) A shell/echo implementation that does not implement the XSI
>>> enhancements could only be certified as an embedded platform.
>>>
>>> So did you check the state?
>>
>> Inspur K-UX 2.0 and (the x86-64 version of) 3.0 are listed at the
>> website of The Open Group as compliant with the Single UNIX
>> Specification and thus certified for use of the UNIX trademark...:
>>
>> http://www.opengroup.org/openbrand/register/brand3617.htm
>>
>> And it definitely _is_ GNU/Linux. RedHat-based, even...:
>>
>> https://en.wikipedia.org/wiki/Inspur_K-UX
>
> If they did really receive a certification, they would need to have a
> "sh" that by default behaves the way "echo" is described in the
> standard and this would explude the availability of options and "--"
> support for echo(1).

Maybe it carries dash, the Debian Almquist Shell. K-UX being based on
RedHat rather than Debian, I would doubt that to be the case, but
nothing is impossible in that regard.

> Did you verify this for Inspur K-UX 2.0?

I believe you have me mistaken for somebody else. I'm simply a guy who
uses GNU/Linux and who's got over a decade and a half worth of
experience doing so ─ both privately and on WAN-exposed servers,
although it's been a few years since I ran any servers of my own.

I don't work for The Open Group, nor for Inspur. Therefore it is not my
place to investigate the POSIX-compliance of GNU/Linux.

The claim was made higher up in this thread that GNU/Linux isn't UNIX,
so I have merely provided evidence of the contrary by pointing out that
The Open Group have officially certified the x86-64 versions of the
Inspur K-UX 2.0 and 3.0 GNU/Linux distributions for use of the UNIX
trademark.

If it bears the UNIX trademark, then it _is_ an official UNIX operating
system, whether you or I agree with that or not. Apple OS X ─ nowadays
called macOS ─ is also an officially certified UNIX, and it is arguably
the least UNIX-like in the traditional sense of all UNIX-like operating
systems, given that it runs a proprietary graphical user interface by
default and that its native filesystem doesn't even honor case-
sensitivity ─ it is case-retentive, yes, but it does not distinguish
between FILE.TXT and file.txt.

--
= Aragorn =

Joerg.S...@fokus.fraunhofer.de

unread,
Nov 21, 2016, 8:03:28 AM11/21/16
to
In article <o0uq5t$nbt$1...@dont-email.me>,
Aragorn <thor...@telenet.be.invalid> wrote:
>On Monday 21 Nov 2016 12:47, Joerg.S...@fokus.fraunhofer.de

>> If this was true, it would be possible to compile them POSIX
>> compliant.
>
>There's no need to recompile them. You can run most of them in strict
>POSIX compliance mode by way of the invocation of parameters.
>
>> As you can read in
>> https://personal.opengroup.org/~ajosey/tr22-07-2004.txt,
>> POSIX compatibility is not intended.

Did you meanwhile read the text?

The support for Linux was aborted because the people behind the GNU tools
rejected to even implement a mode that supports POSIX compliance in the listed
cases.

>>>> 2) Even the kernel is full of deviations. Check e.g. the behavior
>>>> of the waitid() call in Linux. It returns only 8 bits from
>>>> the exit code.
>>>
>>> The source code of the kernel is GPL'd, which means that the
>>> distribution vendor can patch the code. They have to build it from
>>> sources either way, because Linus Torvalds does not release the
>>> kernel as a binary image.
>>
>> So let us see what happens, currently the Linux kernel guys reject ro
>> implement POSIX compliance and the RedHat "Cygwin" guys claim that
>> Cygwin us bug by bug compatible to Linux :-(
>
>Cygwin is not GNU/Linux, no matter what RedHat claims. It's a GNU
>compatibility layer on top of Microsoft Windows.
>
>Microsoft Windows does not support UNIX/POSIX, and the Microsoft NTFS

Well, Microsoft is able to return more than 8 bits from the exit() code of
programs. Cygwin masks this.....so Cygwin is resposible for the non-compliance
here.

Andy Walker

unread,
Nov 21, 2016, 2:56:20 PM11/21/16
to
On 21/11/16 10:26, Joerg.S...@fokus.fraunhofer.de wrote:
>> OP> $ printf "my_user_id\nthis_domain\bmy_password\n"|si_peek server:esoid:98651424
>> OP> *** forbidden command: printf
> What kind of shell is that?
> All major recent shell implementations include printf as a builtin command.

The OP also said that "sh" was forbidden [which makes it surprising
that he was writing shell scripts, but no matter]; and he didn't say that
"printf" didn't exist but that it too was forbidden. Some environments
have truly weird restrictions.

I found myself recently trying to port an ancient script to such an
environment. Nothing was overtly "forbidden" -- there were no error messages
-- but lots of things just didn't work. Eg, "cd" worked *provided that* the
target directory did not begin with "/", so had to be "emulated" by going up
to root using "cd .." and then working down again. Then "dirname" and "tr"
didn't work, but "sed" did, so some more hackery was needed; and I had to
do some arithmetic without using "expr", "bc", "dc" or "awk", but luckily it
was only addition and subtraction, so back to "sed" again. After that, the
script worked ....

--
Andy Walker,
Nottingham.

Thomas 'PointedEars' Lahn

unread,
Nov 21, 2016, 7:29:18 PM11/21/16
to
Joerg.S...@fokus.fraunhofer.de wrote:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Your real name belongs there.

> In article <o0sbcj$2qb$1...@dont-email.me>,
> Aragorn <thor...@telenet.be.invalid> wrote:
^^^^^^^
Your real name belongs there (if you want to be taken seriously [by me]).

>>On Sunday 20 Nov 2016 14:01, Thomas 'PointedEars' Lahn conveyed the
>>following to comp.unix.shell...

To both of you: Attribution _line_, not attribution novel.

>>> This is comp.unix.shell. _G_NU’s _N_ot _U_nix¹ ;-)
>>>
>>> ______
>>> ¹ <https://en.wikipedia.org/wiki/GNU>
>>
>> GNU/Linux *is* UNIX. Inspur K-UX is a GNU/Linux distribution which has
>> been certified by the Open Group for use of the UNIXâ„¢ trademark.
>
> Are you shure?

(_sure_)

Oh for crying out loud. Apparently you guys have too much free time. This
discussion is pointless and full of fallacies; I am going to order popcorn
shares now.

For there are several points that both of you, but especially the anti-
social address munger missed:

1. “GNU’s Not Unix” is the recursive acronym that *defines* the name “GNU”.
Look it up to find out the reason why.

2. There was a smiley at the end.

3. Unix != UNIX.

4. GNU != GNU/Linux.

5. One GNU/Linux distribution being certified does not certify the whole
ecosystem.

6. They could have made an educated guess that as I am using KNode I am
*using* (Debian/Devuan) GNU/Linux. I have been using various GNU/Linux
distributions since 16 years. So it is hilarious to try to lecture me
about it.

7. The point is: In comp.unix.shell we cannot and do not assume the GNU
shell or GNU tools as those are additions to a Unix system. You have
to tell us if you need to/can use those. And we must tell you if
a feature is a GNU extension to a specified Unix tool (as per POSIX).

8. Read, think, post. In *that* order.

Nathan Wagner

unread,
Nov 21, 2016, 7:52:41 PM11/21/16
to
On 2016-11-20, Aragorn <thor...@telenet.be.invalid> wrote:
> On Sunday 20 Nov 2016 14:01, Thomas 'PointedEars' Lahn conveyed the
> following to comp.unix.shell...
>
>> This is comp.unix.shell. _G_NU???s _N_ot _U_nix?? ;-)
>>
>> ______
>> ?? <https://en.wikipedia.org/wiki/GNU>
>
> GNU/Linux *is* UNIX. Inspur K-UX is a GNU/Linux distribution which has
> been certified by the Open Group for use of the UNIX??? trademark.

That doesn't make the combination of Linux and some GNU utilities unix
in that sense, it just makes that particular distribution conforming to
their opinion of what constitutes unix.

However, common usage of the term "unix" is rather more expansive than
"certified by the Open Group", and I strongly suspect that a trademark
case would establish that the term is generic. Obviously you should get
an opinion from your attorney before you act on that assumption.

--
nw

Chris F.A. Johnson

unread,
Nov 22, 2016, 2:08:07 AM11/22/16
to
On 2016-11-22, Thomas 'PointedEars' Lahn wrote:
...
>> In article <o0sbcj$2qb$1...@dont-email.me>,
>> Aragorn <thor...@telenet.be.invalid> wrote:
> ^^^^^^^
> Your real name belongs there (if you want to be taken seriously [by me]).

Most of us read the post to determine whether it should be taken seriously.

--
Chris F.A. Johnson

Kenny McCormack

unread,
Nov 22, 2016, 2:15:36 AM11/22/16
to
In article <1j5dgd-...@cfajohnson.ca>,
And, more importantly, I don't think any of us given two sh*ts in h*ll
whether or not the Pointed Ears crank takes us seriously.

--
"The party of Lincoln has become the party of John Wilkes Booth."

- Carlos Alazraqui -

Aragorn

unread,
Nov 22, 2016, 3:41:19 AM11/22/16
to
On Tuesday 22 Nov 2016 01:29, Thomas 'PointedEars' Lahn conveyed the
following to comp.unix.shell...

> Joerg.S...@fokus.fraunhofer.de wrote:
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Your real name belongs there.

That _is_ his real name, albeit that I agree that this field of the
header should not be filled in with an e-mail address.

I'm no expert on the configuration of trn ─ the newsreader Jörg is using
at the moment ─ but I have also noticed that (his version of) trn has
apparently no support for UTF-8.

>> In article <o0sbcj$2qb$1...@dont-email.me>,
>> Aragorn <thor...@telenet.be.invalid> wrote:
> ^^^^^^^
> Your real name belongs there (if you want to be taken seriously [by
> me]).

1. What defines whether a name is "real" or not? My legal name was
not chosen by me but by my parents when I was born. I do not
identify with that name. I do however identify with the name
"Aragorn", because...

- multiple different and unrelated people started calling me that
when the first LOTR movie came out because of my perceived-by-them
likeness to Viggo Mortenson in that movie;

- I've been using this name as my identity on the internet for over
a decade already, and it is therefore what other internet denizens
know me by; and

- I can perfectly identify with Tolkien's characterization of
Aragorn, because my life has had an uncanny number of parallels
with the life of said Tolkienian character.


2. Whether you yourself take me seriously or not is the least of my
concerns. This is Usenet, not private e-mail, and my posts are
intended for whoever chooses to read them.


3. As Chris F.A. Johnson says, it's the content of the post which
ought to be the indicator of whether it should be taken seriously,
rather than the name it was signed off with.

>>> On Sunday 20 Nov 2016 14:01, Thomas 'PointedEars' Lahn conveyed the
>>> following to comp.unix.shell...
>
> To both of you: Attribution _line_, not attribution novel.

Does a line and a half already make up for the definition of a novel
these days? No wonder IQ scores are dropping like flies all over the
planet then.

>>>> This is comp.unix.shell. _G_NU’s _N_ot _U_nix¹ ;-)
>>>>
>>>> ______
>>>> ¹ <https://en.wikipedia.org/wiki/GNU>
>>>
>>> GNU/Linux *is* UNIX. Inspur K-UX is a GNU/Linux distribution which
>>> has been certified by the Open Group for use of the UNIXâ„¢
>>> trademark.
>>
>> Are you shure?
>
> (_sure_)

Jörg is not an native English speaker ─ like yourself, he is German ─
and even though I don't always agree with his opinions, he is one hell
of a software developer and he writes awesome code. To me, _that_ earns
him my respect, not his writing skills in a language other than the one
he speaks natively.

For that matter, I'm not a native English speaker either. My e-mail
address should tell you what country I reside in, and English is not an
official language here.

On the other hand, one could posit that, for all intents and purposes,
English would be my first language, because it's the language I've been
using 95% of the time for decades already. I even _think_ in English.

> Oh for crying out loud. Apparently you guys have too much free time.
> This discussion is pointless and full of fallacies; I am going to
> order popcorn shares now.
>
> For there are several points that both of you, but especially the
> anti- social address munger missed:

Ad hominem noted.

> 1. “GNU’s Not Unix” is the recursive acronym that *defines* the name
> “GNU”.
> Look it up to find out the reason why.

I _know_ the reason why, and I've already known about that since the
very early 1990s ─ notwithstanding the fact that GNU itself already
dates back to 1983-1984.

Recursive acronyms have always been a favored staple of FLOSS culture,
and Richard Stallman wanted to emphasize that GNU is not the proprietary
Unix system co-developed by AT&T Bell Labs and the University of
Berkeley. _That_ Unix, by the way, is spelled with an initial capital
and lowercase for the other characters.

> 2. There was a smiley at the end.

Smileys can indicate anything from a smile over a smirk/grin to sarcasm.
It wasn't clear at the time.

> 3. Unix != UNIX.

I know that. Unix is the name of a proprietary operating system, the
intellectual property of which was sold to Novell. UNIX is a registered
trademark owned by The Open Group.

> 4. GNU != GNU/Linux.

That is debatable. According to Richard Stallman and the Free Software
Foundation, GNU/Linux _is_ a GNU system. According to Linus Torvalds,
GNU/Linux is simply "Linux".

Personally I see the points of either side. I refer to the system as
"GNU/Linux" in writing, and in verbal communication, depending on the
context, I will refer to it as "GNU plus Linux" when elaborating about
the nature of the system, or just as "Linux" when I mention it in
passing.

> 5. One GNU/Linux distribution being certified does not certify the
> whole ecosystem.

That is true. But then again, Solaris, HP/UX, IRIX, AIX and macOS are
all UNIX systems as well, and yet they do have their distinct
differences.

One example ─ which I've mentioned in my reply to Jörg ─ is the fact
that I consider macOS (formerly known as OS X) the least UNIX-like of
all UNIX-like systems.

Inspur K-UX is based upon RedHat, as are a great number of GNU/Linux
distributions in use today. I seriously doubt whether K-UX would have
replaced or patched too much of their RedHat foundation, and therefore,
chances are that the other RedHat-based distributions would also qualify
for the UNIX moniker, even if they haven't applied for SUS
certification.

> 6. They could have made an educated guess that as I am using KNode I
> am *using* (Debian/Devuan) GNU/Linux. I have been using various
> GNU/Linux distributions since 16 years.

So have I.

> So it is hilarious to try to lecture me about it.

Don't be so vain. Usenet is a public medium. I wrote my post in reply
to yours, but it was _intended_ for _all_ readers, not just for you.

> 7. The point is: In comp.unix.shell we cannot and do not assume the
> GNU shell or GNU tools as those are additions to a Unix system. You
> have to tell us if you need to/can use those. And we must tell you if
> a feature is a GNU extension to a specified Unix tool (as per
> POSIX).

On this, I fully agree.

> 8. Read, think, post. In *that* order.

That's pretty good advice. So why don't you heed it yourself?

--
= Aragorn =

Harry

unread,
Nov 23, 2016, 11:59:31 AM11/23/16
to
On Monday, November 21, 2016 at 2:26:42 AM UTC-8, Joerg.S...@fokus.fraunhofer.de wrote:

> What kind of shell is that?

It's called Limited Shell.
https://sourceforge.net/projects/lshell/

0 new messages