Operating System - HP-UX
1833187 Members
2883 Online
110051 Solutions
New Discussion

Migrating from bourne to posix shell

 
SOLVED
Go to solution
Srikanth Arunachalam
Trusted Contributor

Migrating from bourne to posix shell

Hi,

Can someone please explain me the checklist, I need to have to migrate scripts of bourne shell of TRU64 to POSIX shell of HP-UX. We are in the process of migrating all our existing script in TRU64 to HP-UX 11.23.

Thanks,
Srikanth
8 REPLIES 8
Victor BERRIDGE
Honored Contributor

Re: Migrating from bourne to posix shell

Greetings,

IMHO I believe there is nothing to do...(except to check the correct path...)
the main difference I see between the two is posix shell has added functionalities...
The other way round is a different story


All the best
Victor
James R. Ferguson
Acclaimed Contributor

Re: Migrating from bourne to posix shell

Hi Srikanth:

This should be straightfoward. As Victor, noted, be sure to specify a ahe-bang (#!) interpreter. Use:

#!/usr/bin/sh

...for all users other than root; and *be sure for root* to use:

#!/sbin/sh

The version in '/usr/bin' uses dynamically linked libraries which are not available in single-user mode nor during the early start-up stages. However, its memory footprint is smaller than the staticlly linked libraries used in '/sbin/sh'. Hence, don't ever try and use anything other than 'sbin/sh' as the default shell for root.

Don't use '#!/bin/sh' either as the interpreter. '/bin' is an old transition link (to '/usr/bin' )and is deprecated. I believe it will vanish in 11.31 anyway.

Regards!

...JRF...
spex
Honored Contributor
Solution

Re: Migrating from bourne to posix shell

Srikanth,

Here's a nice page on the differences among various shells:

http://www.softlab.ntua.gr/facilities/documentation/unix/shelldiff.html

The table about halfway down is especially enlightening. While the POSIX shell is not given, 'sh-posix' and 'ksh' are nearly identical, so compare 'sh' to 'ksh'.

PCS
inventsekar_1
Respected Contributor

Re: Migrating from bourne to posix shell

HI srikanth,
first thing is that the "first line"...ie, the #!/usr/bin/sh change.

the second thing is that:
what commands the script uses.
lot of TRU64 commands differ from HPUX commands.
for example, uname -p in TRU64 equal to uname -m or model in HPUX.

see attachment for more.
Be Tomorrow, Today.
Srikanth Arunachalam
Trusted Contributor

Re: Migrating from bourne to posix shell

Hi Sekar,

Thanks for your response. I am not able to assign points. Can you please tell me what should be done to assign points to yourself.

Thanks,
Srikanth
inventsekar_1
Respected Contributor

Re: Migrating from bourne to posix shell

HI srikanth..
u can assign the points in the same way how u assigned to the previous threads.

u will see a my name in and a line:
"Jun 29, 2006 20:21:05 GMT Unassigned "
the unassigned is a "drop down list". use that to assign points.

by the by, assign points for telling how to assign points. hey just for fun..
have fun..
Invent|Sekar
Be Tomorrow, Today.
Srikanth Arunachalam
Trusted Contributor

Re: Migrating from bourne to posix shell

Hi Sekar,

Still I couldnt get that list box of unassigned points. The problem is I already assigned points yesterday, after that I received your valuable response. When I click sort by points..it only sorts with respect to points and doesnt display the list box with unassigned values.

Thanks,
Srikanth
inventsekar_1
Respected Contributor

Re: Migrating from bourne to posix shell

i think u forget to login.
Be Tomorrow, Today.