FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 11-08-2010, 07:06 PM
Phil Savoie
 
Default OT - Any true bourne shells out there for linux?

Hi All,

Was wondering if anyone knows there are any separate rpms to be able to
install a true bourne shell and not one linked to bash.

Thanks in advance,

Phil
--

Manners are the unenforced standards of conduct which
demonstrate that a person is proper, polite, and refined.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-08-2010, 07:14 PM
Clive Hills
 
Default OT - Any true bourne shells out there for linux?

I think no due to Copyright issues.The closest is probably dash which describes itself as a POSIX comptatible shell.Clive



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-08-2010, 10:13 PM
Kwan Lowe
 
Default OT - Any true bourne shells out there for linux?

On Mon, Nov 8, 2010 at 3:06 PM, Phil Savoie <psavoie1783@rogers.com> wrote:
> Hi All,
>
> Was wondering if anyone knows there are any separate rpms to be able to
> install a true bourne shell and not one linked to bash.

Bash has some options to run in compatibility mode. Not sure what you
need, but may do the trick. It's useful if you need to build on Linux
then move to another environment.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-08-2010, 10:39 PM
John R Pierce
 
Default OT - Any true bourne shells out there for linux?

On 11/08/10 3:13 PM, Kwan Lowe wrote:
> On Mon, Nov 8, 2010 at 3:06 PM, Phil Savoie<psavoie1783@rogers.com> wrote:
>> Hi All,
>>
>> Was wondering if anyone knows there are any separate rpms to be able to
>> install a true bourne shell and not one linked to bash.
> Bash has some options to run in compatibility mode. Not sure what you
> need, but may do the trick. It's useful if you need to build on Linux
> then move to another environment.

I thought it did that by default if it was invoked as /usr/bin/sh via
the link ?


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-09-2010, 02:34 AM
Scott Robbins
 
Default OT - Any true bourne shells out there for linux?

On Mon, Nov 08, 2010 at 03:39:22PM -0800, John R Pierce wrote:
> On 11/08/10 3:13 PM, Kwan Lowe wrote:
> > On Mon, Nov 8, 2010 at 3:06 PM, Phil Savoie<psavoie1783@rogers.com> wrote:
> >> Hi All,
> >>
> >> Was wondering if anyone knows there are any separate rpms to be able to
>
> I thought it did that by default if it was invoked as /usr/bin/sh via
> the link ?
>
Doesn't seem to do so, with my strenuous test of typing sh then trying
echo $UID. The true Bourne shell doesn't have that (which messed
me up once when forgetting that and working on an AIX box. I think
that's when I discovered that UID is a bash-ism and not a sh-ism.

Note that that is the only test I did--it might be that everything else
is perfect.

IIRC, back when that happened (writing something portable and needing to
test syntax), I got the best results with dash.

--
Scott Robbins
PGP keyID EB3467D6
( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
gpg --keyserver pgp.mit.edu --recv-keys EB3467D6

Angel: I knew this was gonna happen.
Buffy: What? What do you think is happening?
Angel: You're 16 years old, I'm 241.
Buffy: I've done the math.
Angel: You don't know what you're doing. You don't know what you
want.
Buffy: Oh, no. I think I do. I want out of this conversation.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-09-2010, 05:11 AM
John R Pierce
 
Default OT - Any true bourne shells out there for linux?

On 11/08/10 7:34 PM, Scott Robbins wrote:
> On Mon, Nov 08, 2010 at 03:39:22PM -0800, John R Pierce wrote:
>> On 11/08/10 3:13 PM, Kwan Lowe wrote:
>>> On Mon, Nov 8, 2010 at 3:06 PM, Phil Savoie<psavoie1783@rogers.com> wrote:
>>>> Hi All,
>>>>
>>>> Was wondering if anyone knows there are any separate rpms to be able to
>> I thought it did that by default if it was invoked as /usr/bin/sh via
>> the link ?
>>
> Doesn't seem to do so, with my strenuous test of typing sh then trying
> echo $UID. The true Bourne shell doesn't have that (which messed
> me up once when forgetting that and working on an AIX box. I think
> that's when I discovered that UID is a bash-ism and not a sh-ism.
>
> Note that that is the only test I did--it might be that everything else
> is perfect.
>
> IIRC, back when that happened (writing something portable and needing to
> test syntax), I got the best results with dash.
>


ah, yes. bash as sh is a superset of sh. most anything written
for sh should work, but lots and lots of stuff on bash as sh won't work
on sh

but, then, I'm not sure sh on solaris is quite exactly the same as sh on
aix. anyways, aix users usually uses ksh. but ksh on linux is a
little sketchy.


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-09-2010, 05:37 AM
Bent Terp
 
Default OT - Any true bourne shells out there for linux?

On Tue, Nov 9, 2010 at 12:13 AM, Kwan Lowe <kwan.lowe@gmail.com> wrote:
> On Mon, Nov 8, 2010 at 3:06 PM, Phil Savoie <psavoie1783@rogers.com> wrote:
>> Hi All,
>>
>> Was wondering if anyone knows there are any separate rpms to be able to
>> install a true bourne shell and not one linked to bash.
>
> Bash has some options to run in compatibility mode. Not sure what you
> need, but may do the trick. *It's useful if you need to build on Linux
> then move to another environment.

In that case, tcshell might be a viable alternative. It's more like an
addon for all OS's so the differences might well be smaller. Just a
thought, not a thoroughly tested opinion.

BR Bent
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-09-2010, 10:58 AM
Stephen Harris
 
Default OT - Any true bourne shells out there for linux?

On Mon, Nov 08, 2010 at 10:11:58PM -0800, John R Pierce wrote:
> but, then, I'm not sure sh on solaris is quite exactly the same as sh on
> aix.

Right. There's no uber-standard /bin/sh. Very very old Unix systems
had a /bin/sh that didn't even support functions. And let's not talk
about the different "echo" commands between OSes. When writing portable
code in /bin/sh you always have to make some assumptions.

> anyways, aix users usually uses ksh. but ksh on linux is a
> little sketchy.

ksh93 is pretty good, but not quite as compatible as ksh88. ksh88 was
the SVR4 standard shell (so solaris, aix, hpux, sco etc all had it).
Unfortunately ksh88 wasn't free (speech) so pdksh was created and that's
not quite compatible with ksh88 (eg 'echo hello | read a' gives different
results). What I found funny was that zsh in ksh-compat mode was really
really close (in 1993 I converted a 700 line ksh88 script to run under zsh in
ksh-mode; required 2 changes in total).

On CentOS5 ksh-20100202-1.el5_5.1 is ksh93. It's possible to write code
that works identically in ksh93 and ksh88 and that's pretty portable.

--

rgds
Stephen
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-09-2010, 02:05 PM
Devin Reade
 
Default OT - Any true bourne shells out there for linux?

I've not looked at it in a few years, but I seem to recall that ash
was fairly close to the traditional Bourne syntax.

I don't know if it is helpful to your case, but if you have a
script that is bash-specific, it is a good idea to change the magic
line from
# !/bin/sh
to
# !/bin/bash
That way, if you're running it on non-Linux platforms it will either
work or give you a useful error message up front (in the case that
bash isn't installed).

Devin
--
Don't try to have the last word. You might get it.
- Robert Heinlein

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 11:19 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org