LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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


Closed Thread
  Search this Thread
Old 06-27-2006, 03:41 AM   #1
ragux
LQ Newbie
 
Registered: Feb 2006
Distribution: fedora2, suse
Posts: 14

Rep: Reputation: 0
anybody can do this project????


buildin a simple a shellobjective

to be able to recongnise and understand:
1. the use of systeam calls
2. how commands are interpreted in a UNIX like shell
3. the use of environment variables

procedure

Develop a simple UNIX/LINUX like Shell which satisfies the following requirments.

1. output a promt to the stdout (standard output).USe the '?' symbol as the promt.

2. The Shell must always wait for the previous command to finish before displaying another promt.

4.the command should be capable of accepting parameters.
a.E.g: ?ls-l
5.
a. fork a new process

b. The parant process will wait until the child get terminated

c. the child process will pharse the line of input to extract external command

d. the child process will interpret the first word in the input string as the
external command and should check whether the file name is existing

e. the location of the desired program can be identified by looking at the path
variable for given program

f.if the filename exist the child will execute the filename using systeam calls such as
execve,excepl,execv,execvp,etc.(you may need to find the most appropriate systeam call for your shell).

g.after the child terminate the parent resumes its operation and ready to accept another command

6. shell should bsupport cd and pwd internal commands

a.you may use the echo $PATH and $PWD commands to get values of above variable.

b.you may also use the gentenv and setenv procedures.

7. NO need of supporting input output redirection or piping.

8.the shell should intrrupt (stop) when Ctrl+D is pressed
 
Old 06-27-2006, 03:55 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Yeah, there probably is someone that can do it. You're supposed to "be able to recognise and understand" that list of things. How is getting someone to do it for you going to help you with that? If you're stuck on something and need help, give info about what it is you need help with. Please don't ask people to do work for you.
 
Old 06-27-2006, 04:03 AM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
8.the shell should intrrupt (stop) when Ctrl+D is pressed
This is expected to be Ctrl-C, a typo in your assignment ?
 
Old 06-27-2006, 04:59 AM   #4
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
CTRL+D will log you out!
 
Old 06-27-2006, 06:12 AM   #5
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
If you have specific questions like "I'm trying to do this fork and exec here and for some reason the child is going defunct" feel free to ask.

Nobody here wants to do your homework assignment for you.

Please take some time to read our rules.
 
Old 06-27-2006, 06:48 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
HAHAHAHAHA nice one.
 
  


Closed Thread



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
LXer: Print.Print Add to Project.Add to Project Bookmark with del.icio.us Simplify PHP Development with WASP LXer Syndicated Linux News 0 01-21-2006 08:46 PM
Beginning a big project - Need an Good Project Manager gamehack Programming 3 01-15-2004 11:49 AM
My next project acid_kewpie General 11 11-15-2003 04:30 PM
a project balam General 1 02-01-2003 05:04 PM
Cannot see Open GL project in KDevelop project wizard SparceMatrix Programming 2 08-07-2002 11:14 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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