Operating System - HP-UX
1756569 Members
2579 Online
108848 Solutions
New Discussion юеВ

Re: property of Korn shell and POSIX shell

 
Dennis Handly
Acclaimed Contributor

Re: property of Korn shell and POSIX shell

>why isn't the standard "korn shell" of HP-UX Korn93? can i use Korn93 version /usr/dt/bin/dtksh?

Because it's different? Is it installed on your machines?

>one effect is now when variable not initialized and in the source code exists: "unset VARIABLE" the shell script got an error and stop.

That's goodness.

>with Korn93 I have now problems

What are they? Perhaps that's why ksh93 isn't the default?

>the program tool have been worked for many years with "Korn Shell", so I think it is better for me to use "Korn93"?

It is probably better to continue using ksh.
James R. Ferguson
Acclaimed Contributor

Re: property of Korn shell and POSIX shell

Hi (again):

> can i use Korn93 version '/usr/dt/bin/dtksh'?

Yes, of course. Again, pay attention to everything that has been said in this thread, though.

Regards!

...JRF...
Billa-User
Regular Advisor

Re: property of Korn shell and POSIX shell

i choose now POSIX because Korn93 version '/usr/dt/bin/dtksh' has some effects like :

i tried to check a file with permission "s" (set-owner-ID-on-file-execution or set-group-ID-on-file-execution permission) like

if [ -u file ];then;echo ok;fi

and if doesn't match,also

if [ ! -u file ];then;echo ok;fi

i had to change some source codes for POSIX,but it works now.
James R. Ferguson
Acclaimed Contributor

Re: property of Korn shell and POSIX shell

Hi (again):

Regarding your last post about checking for 'setuid' bits, this works for me:

# cat ./seeset
#!/usr/dt/bin/dtksh
[ -u /sbin/passwd ] && echo "is setuid" || echo "not setuid"
[ -u /etc/passwd ] && echo "is setuid" || echo "not setuid"

Regards!

...JRF...