The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
unix doubts ashishshah.engg UNIX for Dummies Questions & Answers 0 04-24-2008 09:42 AM
How to post a new thread (Regarding Unix related doubts) in Unix Forums indusri Forum Support Area for Unregistered Users & Account Problems 1 03-12-2008 02:01 AM
Unix doubts aswathy UNIX for Dummies Questions & Answers 2 03-07-2008 12:15 PM
Doubts About C Compiler In Unix/linux vrs High Level Programming 1 09-13-2005 06:19 PM
Unix Administration doubts ******** dreams5617 SUN Solaris 1 07-30-2004 11:46 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-21-2001
krishna krishna is offline
Registered User
  
 

Join Date: Aug 2001
Posts: 60
unix & C doubts

Hi,

I have a few doubt here :

1) I want to run a 3 different 'C' programs in same session simulteneously (parelelly). if I make a shell, it is running one after another, I mean it shout run in 3 processors.

2) In 'C' program, how can I assing a value of the unix commant
cat a.txt|wc -l into a c pgrogram variable cnt.

Kindly give the solution to :kkodava@maxis.com.my

Thanks

Krishna
  #2 (permalink)  
Old 08-21-2001
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,122
1) You put an ampersand & at the end of the line in your shell script to background the program. You can get all three running at once this way.


2) Use popen() to get a charater string with the answer. Then use sscanf() to convert that string to an integer.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:38 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.

Content Relevant URLs by vBSEO 3.2.0