OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> File Found But Not ?, File is there except when I run it
tesla_cubed
post Mar 13 2007, 01:29 PM
Post #1





Group: Members
Posts: 28
Joined: 28-April 05
From: Joplin, Missouri USA
Member No.: 7,018



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
Go to the top of the page
 
+Quote Post
T3_slider
post Mar 13 2007, 02:58 PM
Post #2





Group: Members
Posts: 125
Joined: 26-December 06
Member No.: 13,449



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
Go to the top of the page
 
+Quote Post
Capn_Fish
post Mar 13 2007, 03:20 PM
Post #3





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



Also make sure you "chmod a+x" the scripts.
Go to the top of the page
 
+Quote Post
T3_slider
post Mar 13 2007, 03:23 PM
Post #4





Group: Members
Posts: 125
Joined: 26-December 06
Member No.: 13,449



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
Go to the top of the page
 
+Quote Post
Capn_Fish
post Mar 13 2007, 03:31 PM
Post #5





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



I know. Just making sure everybody else know you need to do that.
Go to the top of the page
 
+Quote Post
T3_slider
post Mar 13 2007, 05:16 PM
Post #6





Group: Members
Posts: 125
Joined: 26-December 06
Member No.: 13,449



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
Go to the top of the page
 
+Quote Post
tesla_cubed
post Mar 14 2007, 05:19 AM
Post #7





Group: Members
Posts: 28
Joined: 28-April 05
From: Joplin, Missouri USA
Member No.: 7,018



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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st October 2014 - 04:03 PM