Veronica Hernandez wrote:
The first line of my script is #!/bin/bash
and I have tried to execute my script by typing: xxx.cgi I get bash: xxx.cgi command not found . xxx.cgi I get bash: .xxx.cgi command not found
Have you tried ./xxx.cgi ? The ./ specifies that you should run the script/program in the current directory rather than look for it in $PATH. To list the PATH, use # echo $PATH and to change it, use # export PATH=/home/xyz/bin:$PATH That one makes /home/xyz/bin programs executable from a shell (before any program with the same name in (say) /usr/bin You can put these commands in ~/.bashrc (path_to_your_home_directory/.bashrc) to have them available in every bash shell. Some versions of SuSE make all files in the current directory executable. This makes programming easier and avoids some problems (such as what happens if you try to execute a script you called test without using ./test) but is a security risk because it's also an excellent way of getting you to run a trojan horse program. I disable this feature when I have it. Root should never have this feature. -- JDL