473,387 Members | 1,897 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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
Dec 2 '07 #1
1 3509
numberwhun
3,509 Expert Mod 2GB
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
Dec 2 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Lenn | last post by:
Hello, I have the following example of AsyncCallback from a C# book which I wanted to implement in my project: //Class with AsyncDelegate public class AsyncProcess { public AsyncProcess() {
6
by: PAPutzback | last post by:
The process and execute methods want a path to the executable otherwise they kick out a file not found. So how can I execute the following. It works fine from a command window. echo password|...
2
by: letter4yuting | last post by:
In my method I tried to manipulate a string parameter using IndexOf() method -- even though it compiles all the string methods (IndexOf, Trim, UpperCase....) fail -- except the property Length. The...
8
by: AG | last post by:
Hello, This is my first post to this group, and on top of that I am a beginner. So please direct me to another group if this post seems out of place.... I have recently written a program which...
8
by: jkeith07 | last post by:
Ok so ive reached the end of my knowledge and have tried to find out how to do it and just plain dont understand it. I have a system call: system("db2cmd.exe \"db2 connect to vop9 user...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
2
by: sdanda | last post by:
Hi, I am working on C#. We have a tool called WHOST.exe which is a VC++ MFC application. Recently I modified the application and regenerated the WHOST.exe in Visual Studio 2008. If i open the...
4
hsn
by: hsn | last post by:
hello everyone. i am trying to run the sudo -i command in my mac. here is the code String s = null; try {
6
by: tvnaidu | last post by:
I am trying to create a directory "/log" in linux in below file, it is not creating, I commented windows call and added linux call ro create /log dir. #define DEFAULT_LOG_DIR "/log" void...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.