Help - Search - Members - Calendar
Full Version: File Found But Not ?
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
tesla_cubed
I put together a fiew scripts to start and stop stuff depending on what I want to do. nothing fancy just saving some typing. Work start WPA, start dhcp, start samba, kinda stuff. Here is whrer things get wierd . ls shows my script ls -l shows its executable and ownd by root
CODE
-rwxrwxrwx    1 root     root           92 2007-03-13 15:10 work
-rwxrwxr-x    1 root     root           77 2006-09-22 17:53 wpa


When I try to run it i get
CODE
root-:) work
-bash: work: command not found

This also happens if I copy a binary exe from anywhere except in the Z. Things installed with ipkg and things that are made with make work. It seems to know where there from and if there copied or typed in it dosnt like them. When I first tryed pdaxII1.3 I wrote a small script to load the kennal drivers and start ZKBBD it still works though. I can edit the scripts but just not run them if I copy a working one and then edit and save as a new name it quits working.

Any sugestions?
thanks
Tesla^3
T3_slider
QUOTE(tesla_cubed @ Mar 13 2007, 04:29 PM)
I put together a fiew scripts to start and stop stuff depending on what I want to do. nothing fancy just saving some typing. Work start WPA, start dhcp, start samba, kinda stuff. Here is whrer things get wierd .  ls shows my script ls -l shows its executable and ownd by root 
CODE
-rwxrwxrwx    1 root     root           92 2007-03-13 15:10 work
-rwxrwxr-x    1 root     root           77 2006-09-22 17:53 wpa


When I try to run it i get
CODE
root-:) work
-bash: work: command not found

This also happens if I copy a binary exe from anywhere except in the Z. Things installed with ipkg and things that are made with make work. It seems to know where there from and if there copied or typed in it dosnt like them. When I first tryed pdaxII1.3 I wrote a small script to load the kennal drivers and start ZKBBD it still works though.  I can edit the scripts but just not run them if I copy a working one and then edit and save as a new name it quits working.

Any sugestions?
thanks
Tesla^3
*

Well, the only thing that comes to mind is to go to the directory where your script is located and try
CODE
./work

instead of simply
CODE
work

Or, alternatively, you could put your script in /usr/local/bin and type "work" from any directory (but make sure your PATH variable is set properly by executing
CODE
echo $PATH

and making sure /usr/local/bin is in your path).

It may not be working because when you execute a command without the ./ it looks in your PATH variable and sees if it is in one of those locations and doesn't execute the command in the present folder.

If I misunderstood the problem, just say so. biggrin.gif
Capn_Fish
Also make sure you "chmod a+x" the scripts.
T3_slider
QUOTE(Capn_Fish @ Mar 13 2007, 07:20 PM)
Also make sure you "chmod a+x" the scripts.
*

If you look at the ls output of the scripts I don't think this command needs to be executed. wink.gif
Capn_Fish
I know. Just making sure everybody else know you need to do that.
T3_slider
QUOTE(Capn_Fish @ Mar 13 2007, 07:31 PM)
I know. Just making sure everybody else know you need to do that.
*

I see -- always thinking of others, you are! tongue.gif
tesla_cubed
The ./work did the trick biggrin.gif I didnt ever think that it needed to be in the path to exe. That would keep you from executing data by mastke, cool built in de-wormer tongue.gif .

Thanks
Tesla^3
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.