First script

bibi10

Vu+ Newbie
Hy,
I tried to generate my first script.
This script shall be able to search recorded files and gzip.
But when i use common functions like "find ...", script return error "find not found"
I have putting this script at /usr/script folder and tried to execute from WebInterface.
The command line i am trying to execute is :

find -path $PATH -name $FILE -type f -exec gzip{} \;

Result is :
/usr/script/Manage_Records.sh: line 54: find: not found

Someone has an idea ?

Thx
 
I have also tried this other command founded in forum :
[-e "/usr/bin/find"] && /usr/bin/find -path $PATH -name $FILE -type f

but any result appear.

Thx
 
but isn't $PATH a systemvariable to point out where to search for commands
have you change that one ? check with command set
soo /usr/bin isn't there or ?? normal place for command find I guess
or where do you have your find command
try it simple after a reboot perhaps
find / -name tuxbox

nail it down
 
Oh, yes
PATH is an system variable.
I am renaming path in my script,
Now, with the command bellow, it works.

find $PersoPATH -name $PersoFILE -type f

Thx, little mistakes are not so easy to resolved ;)
Thx
 
Back
Top