tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* ksh function behaviour change
@ 1997-06-24  9:47 c753330
  0 siblings, 0 replies; only message in thread
From: c753330 @ 1997-06-24  9:47 UTC (permalink / raw)
  To: tru64-unix-managers

Esteemed colleagues!

A trainee of mine noted a change of behaviour in the Korn shell in Dunix 4.0.
It concerns the way functions work with $0. I have written a small script
I called "functienaam" illustrating the behaviour change:

#!/bin/ksh
function demo 
        { 
        print $0 
        }
print "Script: `whence $0`"
print -n "Function name: "
demo
exit

On Dunix 3.2G (and HP-UX 10), this results in the expected:
scdw$ ./functienaam
Script: /home/c753330/./functienaam
Function name: demo

On Dunix 4.0 and 4.0B the function does not return it's own name:
nlasdc06.lss.cp.philips.com:sysmgr> ./functienaam
Script: /home/sysmgr/kok/./functienaam
Function name: ./functienaam

Note the different result following "Function name:".  Is this a "feature" of
v4.0, or have I overlooked something? Or is it a bug? Or is it "Posix" perhaps?

TIA and greetings, Alex Kok ( Alex.Kok@nlzcl1.decnet.philips.nl )

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-06-24  9:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-06-24  9:47 ksh function behaviour change c753330

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox