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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-03-2005, 12:37 PM
|
#1
|
LQ Newbie
Registered: Aug 2004
Posts: 9
Rep:
|
do I need ./ to run?
Dear sirs,
I ve been trying to compile some source codes, and I am following exactly the instructions provided with the code: I went to the directory indicated and ran a script ("Allmake") which supposedly would compile everything...
I obsiously checked and found Allmake in the said directory, but I was not able to run it. It says couldnot find command...
When I run with ./ (./Allmake) it did find the command, but inside the script other commands were supposed to be run, and again, without the "./" they dont work...
I desperately need these things to work, so I wonder if I am missing anything, like a way to make scripts to be run without the need of ./...
I am on a bash shell.
Regards,
Luiz
|
|
|
01-03-2005, 12:59 PM
|
#2
|
Senior Member
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802
Rep:
|
bash allmake
make sure your caps are all in the right place as Linux is upper/lower case dependant, unlike windoze...
|
|
|
01-03-2005, 01:32 PM
|
#3
|
LQ Newbie
Registered: Aug 2004
Posts: 9
Original Poster
Rep:
|
Thanks,
But there is still a problem when other scripts are called from inside the main script...
I dont want to add "bash" to all lines inside the main script calling other scripts...
My point is, in RH9 I could run simply by calling the script ($ Allmake), and know, in SuSE9.1 I need to call ./Allmake or bash Allmake, which does not help me, since Allmake calls other scripts...
Do you know how to make SuSE works the way RH was? Is this stuff configurable and did I miss it?
Thanks again...
Luiz
|
|
|
01-03-2005, 02:17 PM
|
#4
|
Senior Member
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973
Rep:
|
Some distro's set the current working directory in your PATH and some do not ( for security). Go back to the directory and type:
export PATH=$PATH:.
this will add the current working directory to your path and eliminate the need for ./
|
|
|
01-03-2005, 05:15 PM
|
#5
|
LQ Newbie
Registered: Aug 2004
Posts: 9
Original Poster
Rep:
|
It still does not work.
It works for simple scripts now, but not for scripts invoking other scripts...
It is a step forward, tough
Thanks,
Luiz
|
|
|
01-03-2005, 05:37 PM
|
#6
|
Member
Registered: Nov 2003
Distribution: slackware 15
Posts: 546
Rep:
|
Check first scripts invoked by yours are not using some bash commands not included in your $PATH.
Most distributions (to be honest I don't know if SUSE does), put /sbin and /bin directory in the root $PATH.
If that is the case you should be able to run the script if logged as root (take care doing that).
Hope this helps
Ciao
|
|
|
All times are GMT -5. The time now is 12:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|