LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-27-2003, 08:14 AM   #1
jt1020
Member
 
Registered: Apr 2003
Location: root@localhost
Distribution: Fedora Core 5, Ubuntu, Debian
Posts: 537

Rep: Reputation: 30
Question Linux can't find a shell script??


Im currently using red hat 9, when i type a command name linux can't find the command even if its in the current dierectory. How can i solve this problem??
 
Old 04-27-2003, 08:18 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
./scriptname

your current directory should NOT be on your path, it's bad system management and can easil break things or confuse the hell out of you...
 
Old 04-27-2003, 08:23 AM   #3
jt1020
Member
 
Registered: Apr 2003
Location: root@localhost
Distribution: Fedora Core 5, Ubuntu, Debian
Posts: 537

Original Poster
Rep: Reputation: 30
I've already tried that, but i still cant seem to solve the problem
 
Old 04-27-2003, 08:25 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
in that case you've not set it executable

chmod +x scriptname
 
Old 04-27-2003, 08:27 AM   #5
jt1020
Member
 
Registered: Apr 2003
Location: root@localhost
Distribution: Fedora Core 5, Ubuntu, Debian
Posts: 537

Original Poster
Rep: Reputation: 30
ok that worked, thanx for d help acid_kewpie

 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script to find a particular string Prasun1 Linux - General 5 08-30-2005 09:23 AM
find shell script help liren Linux - Newbie 3 05-02-2005 03:05 PM
How to find out kernel version in a shell script? ta0kira Slackware 3 10-05-2004 04:54 AM
how to find the pid of a perl script from shell script toovato Linux - General 1 12-19-2003 06:25 PM
shell script to find user(s) profile j-me Programming 2 01-31-2003 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:07 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
Open Source Consulting | Domain Registration