Re: [osol-discuss] How to write portable scripts in Solaris?

2006-07-04 Thread Joerg Schilling
Josip Gracin [EMAIL PROTECTED] wrote: Can we conclude then that there is no way to write an XPG4 compliant shell script which is guaranteed to be runnable in Solaris and Linux? As long as Linux does not include a real ksh under the same path as Solaris, you are correct. Jörg --

Re: [osol-discuss] How to write portable scripts in Solaris?

2006-07-04 Thread Darren J Moffat
Joerg Schilling wrote: Josip Gracin [EMAIL PROTECTED] wrote: Can we conclude then that there is no way to write an XPG4 compliant shell script which is guaranteed to be runnable in Solaris and Linux? As long as Linux does not include a real ksh under the same path as Solaris, you are

Re: [osol-discuss] How to write portable scripts in Solaris?

2006-07-04 Thread Joerg Schilling
I. Szczesniak [EMAIL PROTECTED] wrote: Am I the only one who finds this disturbing? Yes, but Sun doesn't really care about interoperability. There may be This is definitely not correct. Sun cares about interoperabilty and Sun cares about POSIX compliance. Solaris has been certified to be

Re: [osol-discuss] How to write portable scripts in Solaris?

2006-07-04 Thread Josip Gracin
Joerg Schilling wrote: The problem with the OP is that he likes to do things that are beyond POSIX. Yes, that's exactly where I get my kicks. Doing things beyond POSIX. Jeez. ___ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org

Re: [osol-discuss] How to write portable scripts in Solaris?

2006-07-03 Thread Darren J Moffat
[EMAIL PROTECTED] wrote: Here's the situation. The software that I've mentioned contains several scripts to build itself. Those scripts are XPG4 compliant and they have '#!/bin/sh' as their first line. The scripts use some features that Solaris's /bin/sh does not grok. You could make

Re: [osol-discuss] How to write portable scripts in Solaris?

2006-07-02 Thread Casper . Dik
Here's the situation. The software that I've mentioned contains several scripts to build itself. Those scripts are XPG4 compliant and they have '#!/bin/sh' as their first line. The scripts use some features that Solaris's /bin/sh does not grok. You could make the first line of the

Re: [osol-discuss] How to write portable scripts in Solaris?

2006-07-02 Thread Josip Gracin
[EMAIL PROTECTED] wrote: You could make the first line of the scripts: #!/usr/bin/env sh That is what I thought. Shouldn't this become the law then? ;-) I mean, writing '#!/bin/sh' is obviously wrong if you intend your scripts to be run on a standards compliant OS. Although

Re: [osol-discuss] How to write portable scripts in Solaris?

2006-07-02 Thread Joerg Schilling
Stephen Lau [EMAIL PROTECTED] wrote: Josip: Compliant with what standard? To everybody else: please resist the urge. I know you so desperately want to reply, but in the interest of the US-based Sun engineers who don't want to come back from summer break with a mailbox-full of threads and

Re: [osol-discuss] How to write portable scripts in Solaris?

2006-07-02 Thread Joerg Schilling
Josip Gracin [EMAIL PROTECTED] wrote: Stephen Lau wrote: Josip: Compliant with what standard? Here's the situation. The software that I've mentioned contains several scripts to build itself. Those scripts are XPG4 compliant and they have '#!/bin/sh' as their first line. The scripts

Re: [osol-discuss] How to write portable scripts in Solaris?

2006-07-02 Thread Joerg Schilling
[EMAIL PROTECTED] wrote: You could make the first line of the scripts: #!/usr/bin/env sh and set $PATH to find the proper shell. This is not POSIX either and is opens a security hole in case that PATH is problematic. Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353

Re: [osol-discuss] How to write portable scripts in Solaris?

2006-07-02 Thread Erast Benson
Hello! I have several standard-compliant shell scripts. These scripts use '#!/bin/sh'. However, since /bin/sh on Solaris is not standard-compliant, these scripts fail. What is the proper way to write standard scripts in Solaris and make sure that those scripts can be run on other

Re: [osol-discuss] How to write portable scripts in Solaris?

2006-07-02 Thread Josip Gracin
Joerg Schilling wrote: Josip Gracin [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: You could make the first line of the scripts: #!/usr/bin/env sh That is what I thought. Shouldn't this become the law then? ;-) I No, because it opens security issues. Can we conclude then that

Re: [osol-discuss] How to write portable scripts in Solaris?

2006-07-02 Thread I. Szczesniak
On 7/2/06, Josip Gracin [EMAIL PROTECTED] wrote: Joerg Schilling wrote: Josip Gracin [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: You could make the first line of the scripts: #!/usr/bin/env sh That is what I thought. Shouldn't this become the law then? ;-) I No, because it

Re: [osol-discuss] How to write portable scripts in Solaris?

2006-07-02 Thread Hugh McIntyre
I. Szczesniak wrote: Yes, but Sun doesn't really care about interoperability. There may be a change in the future through the ksh93 integration project, but it is doubtful whether Sun will ever update /bin/ksh to ksh93. I don't work at Sun (any more), but it seems more accurate to say that

[osol-discuss] How to write portable scripts in Solaris?

2006-07-01 Thread Josip Gracin
Hello! I have several standard-compliant shell scripts. These scripts use '#!/bin/sh'. However, since /bin/sh on Solaris is not standard-compliant, these scripts fail. What is the proper way to write standard scripts in Solaris and make sure that those scripts can be run on other

Re: [osol-discuss] How to write portable scripts in Solaris?

2006-07-01 Thread Stephen Lau
Josip: Compliant with what standard? To everybody else: please resist the urge. I know you so desperately want to reply, but in the interest of the US-based Sun engineers who don't want to come back from summer break with a mailbox-full of threads and flames about shell wars, please