Connecting Tech Pros Worldwide Forums | Help | Site Map

the command - system ( "source ./profile") not working

Newbie
 
Join Date: Dec 2007
Posts: 1
#1: Dec 2 '07
Hi gurus,
I worte a small perl scripts , and when I tried to run the system command :
system ( "source ./profile ") ;

I recieved the error :
Can't exec "source": No such file or directory at ..

The file exists , and when I run it on bash it works .
Any ideas ?

Regards ,

Rotem

numberwhun's Avatar
Site Moderator
 
Join Date: May 2007
Location: New Hampshire
Posts: 2,572
#2: Dec 2 '07

re: the command - system ( "source ./profile") not working


Quote:

Originally Posted by Rotem Gabay

Hi gurus,
I worte a small perl scripts , and when I tried to run the system command :
system ( "source ./profile ") ;

I recieved the error :
Can't exec "source": No such file or directory at ..

The file exists , and when I run it on bash it works .
Any ideas ?

Regards ,

Rotem

Have you tried putting the full path to the profile file in there and see if that works? Also, are you running this by hand or from Cron?

If it is from Cron then the absolute paths are definitely needed.

Regards,

Jeff
Reply