LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-27-2010, 07:58 PM   #1
girish mururu
LQ Newbie
 
Registered: Apr 2010
Posts: 2

Rep: Reputation: 0
how to remove unwanted output that comes from executing system api?


Hi,
How to remove unwanted output that comes from executing system api?

for eg:
when i execute system("telnet 127.0.0.1") i want the output to start with login and then password and then directly the command prompt,how can i remove the output that gets generated before showing the prompt?

Last edited by girish mururu; 04-29-2010 at 09:12 PM.
 
Old 04-28-2010, 12:49 PM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Which language are you coding in?
 
Old 04-29-2010, 09:12 PM   #3
girish mururu
LQ Newbie
 
Registered: Apr 2010
Posts: 2

Original Poster
Rep: Reputation: 0
@ catkin

the language is c .
 
Old 04-30-2010, 03:30 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
How about writing a shellscript that would filter the output as desired and run that via the system() function?

What are you trying to achieve? To run a telnet session from a C program?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Find command, eliminating unwanted output swamprat Linux - Newbie 7 04-13-2008 07:28 PM
to remove unwanted things from linux kernel mathimca05 Linux - Newbie 1 10-15-2007 06:18 AM
How to remove unwanted data rvsridhar Linux - General 2 05-15-2006 04:07 PM
How to remove unwanted startup programs on mandrake 10.0 Scrag Linux - General 4 02-08-2006 12:38 PM
how do i remove unwanted charaters at "script" command output? linuxzouk Linux - Newbie 4 05-15-2004 08:58 AM


All times are GMT -5. The time now is 07:09 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration