LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   install location of sh (https://www.linuxquestions.org/questions/linux-newbie-8/install-location-of-sh-236227/)

bindweb 09-28-2004 11:08 AM

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.

michaelk 09-28-2004 11:14 AM

Which linux 9, Redhat, Mandrake, Slackware, SuSE?

bindweb 09-28-2004 11:52 AM

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.

dsegel 09-28-2004 11:56 AM

Maybe it can't find perl? Try putting in the full path to the perl executable.

aaa 09-28-2004 11:56 AM

Make sure '/var/www/html/domain1usage' and '/var/www/cgi-bin' exist. Use 'echo' to pinpoint which line is causing the problem.

bindweb 09-28-2004 12:03 PM

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.

chrism01 09-28-2004 12:59 PM

How did you copy the script over?

bindweb 09-29-2004 07:07 AM

copied the script using FTP.


All times are GMT -5. The time now is 04:42 PM.