The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
[BASH - KSH] Passing array to a function ripat Shell Programming and Scripting 3 04-17-2008 05:17 AM
Passing Parameters and getting values back from a c program to Shell script Rajeshsu High Level Programming 5 08-22-2005 12:12 AM
Passing value to an external program problem... giannicello Shell Programming and Scripting 1 08-21-2005 09:53 AM
AWK program with array variable whatisthis Shell Programming and Scripting 4 05-18-2005 08:07 AM
Passing shell variables to awk program.. Vishnu Shell Programming and Scripting 1 07-17-2004 07:04 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-19-2008
Registered User
 

Join Date: Nov 2007
Posts: 127
Help in passing array of inputs to C program using script?

Hi,

I have a file input which has 1000 data inputs of array elements.

I would like to pass this to a C program one line at a time as input automatically. Anyone know how I could use "sed" to perform this?


Appreciate alot. Thanks.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-20-2008
Moderator
 

Join Date: Feb 2007
Posts: 1,965
What is the reason to use sed? In C you can use fpopen() and fgets() to read the file.

Regards
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:11 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0