strange $cwd behavior

strange $cwd behavior

Post by Ernest S » Mon, 06 Nov 1995 04:00:00

I have some trouble with $cwd.
I was trying to write a script that make use of the $cwd.
When I type in the command echo $cwd under unix prompt, it gives me
the correct path.  However when I wrote a simple script like this:
        echo $cwd
which is executed under the same path, it prints out something different.
and that path doesn't even exists.  However, this happens only to me but
not other users and it only happens under some specific path.
What things can leads to this $cwd behavior when printed out under unix
prompt and from script?

1. lpr strange behavior with cwd is an nfs mount

If I do "lpr file_name" when my cwd is an nfs mounted directory,
I get the message "lpr: cannot access file_name".
However, if I cd to my home directory, and say
"lpr /nfs_mounted_directory/file_name", it works fine.
This seems very strange to me. Can anyone explain this?
I am using kernel 1.1.75 on the nfs server, and
1.2.1? on the other machine, where I am typing these commands.
Both have slackware 2.2 network stuff.
Thanks for any help.


2. Need a very simple calculator...

3. Strange NFS behaviour

4. SMC EtherPower PCI supported?

5. Strange Netscape Behavior with RH 6.2

6. Which Linux for me?

7. Strange behavior of socket communication

8. binhex

9. Strange behaviour of "setbuf" on HP

10. Strange Behaviour of sar and cpuhog

11. Strange find behavior?

12. Strange login behavior

13. Sudden strange mouse behavior