tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* MORE INFO -- Re: Bizzare ksh behavior, Tru64 UNIX V4.0F
@ 2001-06-22 15:24 Narendra Raavi
  0 siblings, 0 replies; only message in thread
From: Narendra Raavi @ 2001-06-22 15:24 UTC (permalink / raw)
  To: tru64-unix-managers


Managers,

We are convinced that this is a bug. Here is more information about
the problem:

> Managers,
> 
> We are having a very bizzare shell program behavior. Here is the context:
> 
>   ENV=/home/narendra/.kshrc
>   PATH=/home/narendra/bin:/usr/bin:.
> 
> The file .kshrc contains the following line:
>   typeset -x MYTEST=55
> 
> I have two scripts named tst: one in ~/bin and another in ~/tmp
> 
> /home/narendra/tmp/tst has the following two lines:
> 
>   #!/bin/ksh
>   print "In the tmp directory"
> 
> /home/narendra/bin/tst has the following two lines:
> 
>   #!/bin/ksh
>   print "In the bin directory"
> 
> 
> When I change directory to tmp and execute /home/narendra/tmp/tst
> I see the following output:
> 
>   In the bin directory

command line: /home/narendra/tmp/tst
CWD: /home/narendra/tmp
For the record, I expected 'tmp' instead of 'bin' in the output.

> When I execute ./tst from tmp, I see the following output:
> 
>   In the tmp directory

command line: ./tst
CWD: /home/narendra/tmp
For the record, this is the expected output.

> When I execute /home/narendra/tmp/tst from anywhere else, I see the
> following output:
> 
>   In the tmp directory

command line: /home/narendra/tmp/tst
CWD: any other directory other than /home/narendra/tmp
For the record, this is the expected output.

> This behavior is seen only on Tru64 UNIX (V4.0F), not on solaris 5.6, HP-UX
> 10.20 or HP-UX 11.x.
> 
> I do not have access to other versions of Tru64 UNIX.
> 
> I believe this is a bug. Can others on this list confirm this? What's the
> process if this is indeed a bug?
> 
> Thank you,

The following statements are true:

 1.  If I remove the line #!/bin/ksh from /home/narendra/tmp/tst,
     everything works fine.

 2.  If I unset ENV, everything works fine.

 3.  If I use an empty file as value of ENV, everything works fine.

 4.  If the last command in the file pointed by ENV is a shell built-in or
     a command it does not find or another shell script I see this bizzare
     behavior.

-- 

 -- Narendra Ra[a]vi     Email : narendra@spiff.hr.att.com
    MT  A4-4B27       Phone : 732-420-7792

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

only message in thread, other threads:[~2001-06-22 15:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-22 15:24 MORE INFO -- Re: Bizzare ksh behavior, Tru64 UNIX V4.0F Narendra Raavi

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