Why doesn't "source myShellLibs" or ". myShellLibs" in my shell scripts find the file "myShellLibs" in the current directory?
Issue
-
Unable to migrate ksh scripts from RHEL5 to RHEL6
-
Why doesn't this:
$ cat 1.sh
#!/bin/sh
. DTCfunctions
sayInfo "Hello"
# End of file
$ ls -l
total 28
-rwxr-x---. 1 rkotapat csi 59 Oct 6 17:55 1.sh
-rwxr-x---. 1 rkotapat csi 22877 Oct 6 17:53 DTCfunctions
$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/rkotapat/bin
$ ./1.sh
./1.sh: line 3: .: DTCfunctions: file not found
./1.sh: line 5: sayInfo: command not found
work?
Environment
Red Hat Enterprise Linux
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.