LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-11-2002, 09:03 PM   #1
Saeven
LQ Newbie
 
Registered: Nov 2001
Location: Canada
Distribution: Slackware 8.1
Posts: 26

Rep: Reputation: 15
Help with something basic


Sup crew...

I have a really basic question..

I have a script in a directory ' /dir/area ' called 'start'

If my current directory is ' /dir/area ' and I type './start' the script works fine. However, if I am in /dir and I type ' area/start ' the thing doesn't work ( it references files from diff directories ).

Any idea? I need a one liner so that I can execute it from a php execute command.

thanks.
Saeven
 
Old 06-11-2002, 09:09 PM   #2
finegan
LQ Guru
 
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 72
area/start isn't in your path. If you typed out the complete directory /dir/area/start, you'd be fine because you told bash exactly where to go, or offhand if you put start in /usr/local/bin and then typed start, it would run because /usr/local/bin is in your path. See either your .bashrc file, .bash_profile or .profile file (depends of release, distro, era of shell-utils, blah blah blah which of those three it is and likes are your path is sourced from another file).

Cheers,

Finegan
 
Old 06-12-2002, 12:05 AM   #3
sakeeb
Member
 
Registered: Apr 2002
Posts: 270

Rep: Reputation: 31
type ./area/start

if you want to be able to run it by typing /area/start add current directory to you PATH environment variable

PATH=$PATH:.

also you can edit it in your ~/.bash_profile
 
Old 06-12-2002, 04:03 AM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
you could also make a symlink to it even, place the link in the /sbin, /usr/sbin.... etc..
 
  


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
Very Basic Help Lyko Linux - Newbie 72 03-17-2005 08:53 PM
really basic os? gravy Linux - Newbie 7 02-26-2005 09:20 PM
basic Ryan450 Linux - General 5 08-20-2004 11:59 PM
Really Basic ?'s Susan Linux - Newbie 3 10-26-2001 01:51 PM
I'm a BASIC chap, looking for some info on BASIC programming CragStar Programming 2 01-21-2001 09:19 AM

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

All times are GMT -5. The time now is 01:43 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