LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 11-05-2005, 08:13 PM   #1
akshay_jp
LQ Newbie
 
Registered: Sep 2005
Location: Bangalore,India
Distribution: Ubuntu dapper
Posts: 26

Rep: Reputation: 15
shell scource code???


ppl i need to build a shell as my academic project can you tell me where can i get a sample source code so that i get an idea to start the project....
any report will also do
 
Old 11-05-2005, 08:27 PM   #2
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 56
http://ftp.gnu.org/pub/gnu/bash/bash-3.0.tar.gz
 
Old 11-05-2005, 08:29 PM   #3
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Well, I don't think sample code is really going to help that much. However, you can download the source to most (if not all) of the popular shells through freshmeat.

Here are links to some of the most popular shells' pages on freshmeat:
bash
tcsh
ksh (public domain version)

The reason I say they may not be that useful is because these are full-on projects. There is a lot of code to implement features that may not apply to the goals of your project. Depending on the level of this project (high school, undergraduate, or graduate), those features may serve to unnecessarily complicate the extraction of code examples; you have to filter out what's important and what's not. Figuring out what's important is a huge task on its own.

If this is a first-year or other basic programming course assignment, then looking for sample code in the above projects is likely a mistake. Just focus on implementing a basic loop:[list=1][*]Prompt the user for input[*]Parse the command[*]Execute the operation[*]Display results (if necessary)[*]Loop back to #1[/list=1]
Shells are not fundamentally complex programs. The features (tab completion, environment variables, etc.) are where the complexity comes in.

EDIT:
Doh! cs-cam beat me to the punch with the bash link... I type too slowly...
 
Old 11-05-2005, 09:46 PM   #4
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 47
this is a fun website
http://www.southern-storm.com.au/v7upgrade.html
it also has a link to The Unix Heritage Society's FTP site
which has all kind of cool and very old junk
http://minnie.tuhs.org/UnixTree/
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where's the scource? Cornelius413 Mandriva 2 07-01-2004 08:06 AM
c code vs shell script again? khucinx Programming 1 05-12-2004 09:44 PM
c code vs shell script? khucinx Programming 1 05-12-2004 06:06 PM
how to execute shell script with c code? khucinx Programming 3 05-04-2004 02:54 PM
Help with installing open scource version of Linux microkid88 Linux - Software 1 02-14-2002 12:32 AM


All times are GMT -5. The time now is 11:59 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
Open Source Consulting | Domain Registration