From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078613510587.tru64-unix-managers.marc@archive.invalid> From: c753330 () nlzcl1 ! decnet ! philips ! nl (Alex Kok) Date: Tue, 24 Jun 1997 09:47:30 +0000 To: tru64-unix-managers Subject: ksh function behaviour change X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078613510587 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 )