LinuxQuestions.org
Visit Jeremy's Blog.
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 10-31-2003, 07:10 AM   #1
huno
Member
 
Registered: May 2002
Distribution: Slackware 9.1
Posts: 161

Rep: Reputation: 30
linux and C


I have 2 Questions:

Question 1:

The program first displays a list of commands (ls, pwd, ps) and exit.
It asks the user to select a command he wants to run (exit to terminate the program).
The parent process then creates a child process that executes the selected command. During that time the parent process must wait. Once the child process is finished, the parent process displays the list of commands again and continues as described above.

Questoin 2:

The parent process creates a PIPE and a child process.
The parent process reads a text file (create a file before running the program) and passes the contents of the file (word by word) to the child process through a PIPE.
The child process reads the PIPE and prints only those words which are less than 5 characters long. It also counts such words and displays this count when there is no more data in the pipe. The child process then terminates.
The parent process closes the files and terminates too
 
Old 10-31-2003, 07:20 AM   #2
musrum
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 112

Rep: Reputation: 15
What are you asking?
 
Old 10-31-2003, 09:11 AM   #3
denominator
Member
 
Registered: Oct 2003
Distribution: Red Hat 9
Posts: 42

Rep: Reputation: 15
Are you asking people to do your homework for you? Thats not going to get you anywhere.
 
Old 10-31-2003, 03:08 PM   #4
afrm
LQ Newbie
 
Registered: Oct 2003
Location: Portugal
Distribution: rh9
Posts: 27

Rep: Reputation: 15
where is the "?" :P
 
  


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
link dies intermittently-seemingly at random- between win<->linux not linux<->linux?? takahaya Linux - Networking 10 03-09-2007 10:37 PM
triple boot linux/linux/linux No Windows involved toastermaker Linux - Newbie 12 03-02-2006 10:40 PM
Redhat (rhel v2.1) bootup problem with linux (linux vs linux-up) namgor Linux - Software 2 06-24-2004 02:49 PM

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

All times are GMT -5. The time now is 01:24 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