Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 07-10-2005, 02:49 PM   #1
LQ Newbie
Registered: Jul 2005
Location: pakistan
Posts: 1

Rep: Reputation: 0
Simulateing a Linux shell called MASH

I am trying to Simulate a Linux shell, called MASH (for MiniAture SHell) in the C language but its not working can any one make it for me.
Old 07-10-2005, 04:28 PM   #2
Registered: Jun 2005
Location: Pennsylvania
Distribution: Kubuntu
Posts: 197

Rep: Reputation: 32
What does the simulation do exactly? What platforms does it target? If it is supposed to be a piece of software as sophisticated as say, GNU bash, it is unlikely that someone could just whip one up for you from scratch. The shell may just look like "$", but it is a pretty impressive program with a boatload of documentation that has been refined over a period of years.
Old 07-10-2005, 05:15 PM   #3
Senior Member
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 372Reputation: 372Reputation: 372Reputation: 372
Not trying to be a jerk... It sounds to me like it's a programming assignment. I ran across at least one class in college that assigned a program description such as:

Write a basic command interpreter.
The program should present the user with an opportunity to enter commands, process them, and wait for the next command.
Your program will need to parse the command line to determine the command and argument(s).
The commands that must be supported are:

So, there are three things I see that will prevent anyone from posting a "solution". First, it sounds like homework.

Second, nobody is receptive to "I can't do it, so do it for me" requests. If you want help, the traditional approach is to post the code you have, explain what's not working, and identify what's been tried to fix it.

Lastly, the foundation of any shell is simply a loop: read input from the user, parse, take appropriate action, get input from the user. It's not tough. That's not to say bash is simple, but it follows the same premise. The OP can always download the source code to bash and snoop around if ideas are needed.
Old 07-10-2005, 05:31 PM   #4
Senior Member
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
I agree with Dark_Helmet, no one is going to do it for you, post up the relevant lines of code that are causing the errors, along with the errors, explain what you are trying to do and what you have done already to try and fix the problem - you will get a much more helpful response
Old 07-10-2005, 05:59 PM   #5
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
This isn't the forum for posting something you want somebody to write for you. We will be happy to help you with any specific problems you have.


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
What is the Linux file system called? gooshto Linux - Newbie 7 11-23-2005 07:14 PM
I just bought a book called "Linux in a Nutshell" Mr. Hill Linux - Newbie 15 03-15-2005 12:26 PM
What are these called and where to get?? TippyToes Linux - Software 2 01-20-2005 03:38 PM
Foreign to this strange new world called Linux..... wem0635 Member Intro 0 09-10-2003 12:03 AM
Writing shell script called "convert" bluewolf Programming 3 02-04-2003 10:52 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:29 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration