LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-28-2004, 12:08 PM   #1
bindweb
LQ Newbie
 
Registered: Sep 2004
Posts: 9

Rep: Reputation: 0
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.
 
Old 09-28-2004, 12:14 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,933

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Which linux 9, Redhat, Mandrake, Slackware, SuSE?
 
Old 09-28-2004, 12:52 PM   #3
bindweb
LQ Newbie
 
Registered: Sep 2004
Posts: 9

Original Poster
Rep: Reputation: 0
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.
 
Old 09-28-2004, 12:56 PM   #4
dsegel
Member
 
Registered: Aug 2004
Location: Davis, California
Distribution: Gentoo, always Gentoo.
Posts: 159

Rep: Reputation: 30
Maybe it can't find perl? Try putting in the full path to the perl executable.
 
Old 09-28-2004, 12:56 PM   #5
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
Make sure '/var/www/html/domain1usage' and '/var/www/cgi-bin' exist. Use 'echo' to pinpoint which line is causing the problem.
 
Old 09-28-2004, 01:03 PM   #6
bindweb
LQ Newbie
 
Registered: Sep 2004
Posts: 9

Original Poster
Rep: Reputation: 0
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.
 
Old 09-28-2004, 01:59 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
How did you copy the script over?
 
Old 09-29-2004, 08:07 AM   #8
bindweb
LQ Newbie
 
Registered: Sep 2004
Posts: 9

Original Poster
Rep: Reputation: 0
copied the script using FTP.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox install location noh.way.jose Linux - Software 6 11-24-2004 07:09 AM
Location of install directorys (using rpm). brynjarh Linux - Newbie 2 06-16-2004 07:19 AM
Multi location Linux install balajipriya Linux - General 3 04-05-2004 01:59 PM
Firefox install location urban Linux - Software 3 03-01-2004 09:16 PM
rpm install location ...how to tell ? dynamo|x Linux - Software 6 06-01-2003 06:13 PM


All times are GMT -5. The time now is 07:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration