install location of sh
sh is generally located in /bin/sh , but on my install of linux 9, I cannot seem to find where sh is installed, I need to reference it in my shell script in order to get it running properly.
Any help or pointers would be great, thanks a lot in advance. Imran. |
Which linux 9, Redhat, Mandrake, Slackware, SuSE?
|
sorry my mistake, I did find sh at the right location /bin/sh but somehow the script that was working on redhat linux 7.3 has errors on redhad linux 9
on running this script #!/bin/sh save_date=`date +%b%Y` targetpath=/var/www/html/domain1usage/$save_date awDomain=domain1 mkdir $targetpath awPath=/var/www/cgi-bin perl $awPath/awstats.pl -config=$awDomain -update it keeps on saying no such file or directory exists, and I cannot seem to figure out why it is doing that. |
Maybe it can't find perl? Try putting in the full path to the perl executable.
|
Make sure '/var/www/html/domain1usage' and '/var/www/cgi-bin' exist. Use 'echo' to pinpoint which line is causing the problem.
|
Thanks a lot for your quick response.
its strange but it seems that when I dont use variables in the shell script it works fine, whats happening is that two \r\r are being appened to the end of variables hence the path turns out to be /var/www/html/domain1usage\r\r I dont understand why the variables are putting two carriage returns at the end values. Any ideas. |
How did you copy the script over?
|
copied the script using FTP.
|
All times are GMT -5. The time now is 04:42 PM. |