From: c753330 () nlzcl1 ! decnet ! philips ! nl (Alex Kok)
To: tru64-unix-managers
Subject: ksh function behaviour change
Date: Tue, 24 Jun 1997 09:47:30 +0000 [thread overview]
Message-ID: <96078613510587.tru64-unix-managers.marc@archive.invalid> (raw)
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 )
reply other threads:[~1997-06-24 9:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox