![]() |
|
#1
|
|||
|
|||
Unix Shell in CHi,
I am new to programming in C. I have to create a unix shell that can implement 1. basic commands such as ls, pwd, mkdir etc 2. can implement redirection 3. pipelining Any help on where to start from or source codes will be appreciated Thank You |
|||
|
#2
|
|||
|
|||
Re: Unix Shell in CYou can look at bash source code, although being that you are a novice this may be hard to swallow.
There is little out there in terms of building your own shell (at least that I have seen) as it is a non-trivial process. How long do you have and what is your background? __________________
My personal site: Utilities for text processing, debugging, testing and plotting |
|
#3
|
||||
|
||||
Re: Unix Shell in CQuote:
Maybe start with "ash" from the Busybox project? MxB |
|
#4
|
|||
|
|||
Re: Unix Shell in Chey guys,
Thanks for the quick reply. I am familiar with a bit of UNIX but not at all with C or any other programming languages. I know the basic commands in UNIX. I did go through some source codes but they all went over my head. I checked some tutorials of C but still i could not get anything when i went through the source codes. This thing is killing me |
|
#5
|
|||
|
|||
Re: Unix Shell in CDont get discouraged; persistence pays off.
Start small by writing the main execution loop. Thats basically all a shell does is process input in a loop and hand functionality off to the proper executables. Scripting is a bit more involved, but lets leave that for now. The main loop should look something like: Code:
__________________
My personal site: Utilities for text processing, debugging, testing and plotting |
Recent GIDBlog
Once again, no time for hobbies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Make a Unix shell in C | james_carter | C Programming Language | 4 | 25-Feb-2009 13:56 |
| Probing for TCP connections | kterry | C Programming Language | 3 | 14-Feb-2008 12:32 |
| get the local host ip in unix os | kmathanbe | C++ Forum | 2 | 02-Jan-2007 22:46 |
| C++ on Unix.. | aleppos | C++ Forum | 18 | 05-Jun-2005 23:11 |
| Call a C program through Linux shell script | nuwandee | C Programming Language | 3 | 29-Mar-2004 22:54 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The