LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 06: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 08:12 PM.
 
Old 04-28-2010, 11:49 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Which language are you coding in?
 
Old 04-29-2010, 08: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, 02:30 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:18 PM.

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