![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| c system call | rangaswamy | High Level Programming | 1 | 02-19-2008 01:53 PM |
| how to differentiate system call from library call | muru | UNIX for Advanced & Expert Users | 2 | 07-20-2007 12:20 AM |
| Making Socket System Call From Linux Kernel Module? | mian_m_hamayun | Linux | 0 | 04-06-2005 10:34 AM |
| Making a SOAP call from within unix shell scripts | Laud12345 | Shell Programming and Scripting | 2 | 02-16-2005 02:23 PM |
| exec() system call | a25khan | High Level Programming | 2 | 02-03-2004 12:06 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Making a system call
This is a total nooby question, but here goes...
I am trying to do something in C for the very first time, and doing it in Solaris, for the very first time. It would otherwise be easy enough to test out and find out, but I wont be able to do so until the week after next for various reasons, so I was just wondering if this would work... I am replacing a script file with C code. The script starts out such as: #!/bin/ksh export BUILD_DIR=`cat /nssn/cm/current_build` export HOSTNAME=`hostname` echo ColdStart>$BUILD_DIR/logs/StartType etc... so, can I just replace that with system calls such as: system("#!/bin/ksh"); system("export BUILD_DIR=`cat /nssn/cm/current_build`"); system("export HOSTNAME=`hostname`"); etc... At first I thought yes but then I wondered, does each system call sort of call in a different shell? If so, would the environment variable defined in one system call be seen from another system call? If that is a problem, is there any way to do all of the system calls in a single system call? Help a noob out...and thanks for any help in advance!!! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|