LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to execute a script file? Have file/directory not found error (https://www.linuxquestions.org/questions/linux-software-2/how-to-execute-a-script-file-have-file-directory-not-found-error-601595/)

sirius57 11-21-2007 11:17 PM

how to execute a script file? Have file/directory not found error
 
I am trying to execute the ivtvfwextract.pl script file against pvr48wdm_1.8.22037.exe as root and I get the bash error file not found or path not found. Is there a location or syntax that I am not using? The docs say: ./ivtvfwextract /path/to/firmware. I am trying to run the script in my home folder and I also copied the files and tried running it in /lib/modules.

indeliblestamp 11-21-2007 11:37 PM

Well assuming you are in your home folder, run ls to confirm that both ivtvfwextract.pl and pvr48wdm_1.8.22037.exe are present there.
./ivtvfwextract.pl means that ivtvfwextract.pl is in the present working directory. If its in some other location, you must use the full path to run it. e.g. /home/sirius57/ivtvfwextract.pl.
So can you trying again with the full paths for both the script and the arguments?
e.g. /home/sirius/ivtvfwextract.pl /home/sirius/pvr48wdm_1.8.22037.exe
(Also remember that you script should be executable for it to run)

zymos 11-21-2007 11:43 PM

you need to check 2 things.... See if the file's permissions are executable and where perl is located.

1. Go into the dir the script is and type
'ls -l'
it will be something like this...
-rwxr-xr-x 1 zymos zymos 104 Nov 21 17:28 azScript

It needs to have 'x' for executable
-(rwx for user)(r-x for group)(r-x for everybody)
it does not need to be exacty like shown above, it just need x for user
If its not run
'chmod 755 ivtvfwextract.pl'

try running it again

it may say something like perl not found.....
you can try
'perl ivtvfwextract /path/to/firmware'


or find where perl is

type 'which perl'

then edit the first line of the script to have the correct location for perl

'#!/usr/bin/perl'

hope this is enough, but not too much intel


ZyMOS
http://howto.wikia.com


All times are GMT -5. The time now is 12:30 AM.