LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-13-2007, 10:06 AM   #1
chrislam
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Rep: Reputation: 0
implement pipe using C


My assignment is going to create a simple shell and can handle pipe using c
such as the command " cat | cat | more"
I have no idea to do this since I don't know much about the pipe
and I don't know how to let the output of the front process be the input of the following process
let "cat | more" as an example
how to make the STDOUT of cat be the STDIN of more?

Last edited by chrislam; 09-13-2007 at 10:09 AM.
 
Old 09-13-2007, 10:14 AM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
The best way to get the most from this classroom assignment is to google for this:
Code:
C pipe
Hope this helps.
 
Old 09-13-2007, 11:50 AM   #3
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
man 3p pipe
man 3p popen
 
Old 09-17-2007, 09:33 AM   #4
gauthamk
Member
 
Registered: Jun 2007
Location: Chennai-India
Posts: 39

Rep: Reputation: 15
Smile solution for pipe

Follow this link u will get some good exemples on pipes.

1)http://www.cs.cf.ac.uk/Dave/C/node23.html

2)http://www.ee.ic.ac.uk/docs/software...sfer/pipe.html
 
  


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
best way to implement syslog slug420 Linux - General 2 03-21-2007 01:23 PM
rsync : how to use and implement indiancosmonaut Solaris / OpenSolaris 8 03-04-2007 11:54 PM
how to implement bridging kaleeshwari Linux - Networking 1 01-22-2007 06:11 AM
About SSH, how to implement this? ICO Linux - Networking 2 04-14-2006 03:52 PM
Shell implement in c SatYr_84 Programming 8 10-06-2005 12:44 AM


All times are GMT -5. The time now is 02:56 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration