LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-03-2007, 02:42 AM   #1
mallikk_in
Member
 
Registered: Jun 2006
Posts: 34

Rep: Reputation: 15
hw to excute command_string in sprintf


im wondering hw i can make string formed to work in system command
case :
have formed comand string
sprintf(command_string," iptablwes ...");
to use
system("command_string");

how to achieve it?
 
Old 09-03-2007, 09:57 AM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
You put those statements in function main() in a source file, make sure you've included the #includes mentioned in the man pages for sprintf() and system(), fire up the compiler, and run the program.

But maybe I'm misunderstanding your question.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
when i excute su and password im gettin an authorization error adamf4i Linux - Newbie 12 08-07-2006 09:52 AM
Dynamic sprintf introuble Programming 6 06-25-2006 08:20 AM
Excute macro without opening openiffice indraveni Linux - General 0 05-08-2006 12:49 AM
sprintf() help needed!!! rino.caldelli Programming 9 03-07-2006 06:43 AM
Unable to excute scripts Aziz Linux - Newbie 4 11-28-2004 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration