Visit Our UNIX and Linux User Community


Mini Shell in C


 
Thread Tools Search this Thread
Top Forums Programming Mini Shell in C
# 1  
Old 06-05-2001
Mini Shell in C

Hi Everyone,
I am a student learning C and Unix. I want to create a shell in C
which accepts command line arguments and executes them.
I am not sure how to do this. Any help would be greatly appreciated.
Thanks



This User Gave Thanks to passat For This Post:
# 2  
Old 07-01-2005
Power

Have you ever hear something about system() ? Smilie
# 3  
Old 07-01-2005
A couple of days back, I came across an URL wherein, someone actually posted the source code for a shell he wrote in c++.

That could be a good starting point for you. But if you use that as your point of beginning, then you would be biased to think in the same way he does.

But for pure learning purpose, I shall paste the URL here.

http://www.bloggerman.com/articles/2003/November/shell

Beware tho', if the moderators think this reply is in violation of the 'homework rule' they will remove it.

Best regards,
Vino
# 4  
Old 07-01-2005
Network

Quote:
Beware tho', if the moderators think this reply is in violation of the 'homework rule' they will remove it.
This remark was for me? Smilie
# 5  
Old 07-01-2005
Quote:
Originally Posted by zylwyz
This remark was for me? Smilie
Not at all intended for you.

What I meant was if my reply, in which I posted the URL, is a violation of the 'homework rule' i.e.

(6) Do not post classroom or homework problems.

then the administrators/moderators could possibly delete the post.

The o/p needed some help with creating a shell in C. It could be an assignment. And my post gives you the answer directly. And hence, that will raise the `violation interrupt`. Smilie

Cheers Smilie
Vino
# 6  
Old 07-01-2005
We do have some rules here and we expect everyone to follow them. One of the rules is:

(6) Do not post classroom or homework problems.

If you suspect that a question violates this rule, please don't answer it anyway. This encourages further rule violations.

At this point passat, if he waited for years, knows how to download the source code for a shell. I guess what he wanted, but that's not the same thing as creating the source code for a shell.

Answering a 4 year old question is a bit odd, but I guess I'll leave the thread open.

Previous Thread | Next Thread
Test Your Knowledge in Computers #675
Difficulty: Easy
Wi-Fi is generally less vulnerable to hacker attacks than wired networks.
True or False?

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Thompson MSH(mini-shell)

Hi Guys! Recently, I disassemble the MSH. And reconstructed. I thought maybe somebody wants to see looked like a second shell. In practice, the most ancient shell. It is written in assembler (AT&T). Owner Ken Thompson, Dennis Ritchie. mov $parbuf,r1 mov $parp,r2 clr r3 jsr pc,blank... (0 Replies)
Discussion started by: GLbS
0 Replies

2. Shell Programming and Scripting

Need help in a mini project

Hi All, I want to make something like described below - "Double click on an executable file that will check the health status and other things of various linux servers and send an email to a list of people." I can make shell scripts for individual servers but how to make a script that will check... (1 Reply)
Discussion started by: csrohit
1 Replies

3. Shell Programming and Scripting

Mini Project

Hi Experts, I'm a newbie.....just now i started to write some simple scripts on my own. Can anyone suggest me any simple project kind of stuff to hone my SHELL SCRIPTING skills....which involves database connection and more than that.....bcoz i already tried to write a script which connects to... (0 Replies)
Discussion started by: kritibalu
0 Replies

4. Programming

Some questions for mini game

Hello fellow programmers!:) First of all excuse me for my English, i am from abroad... I am trying to learn the C++ programming language as it is one of the most basic languages.So,instead of just creating small examples for each feature(like class,input/output etc), I decided to create a mini... (6 Replies)
Discussion started by: bashuser2
6 Replies

5. UNIX for Dummies Questions & Answers

mini shell programming (help)

Hi All, Well i m a taking an operating system course (newbie to unix) we have studied till now: the fork () execv() the teacher asked us to create a mini shell that execute a user command: cmd1 he said everything in is optional we can use any combination Well dudes , i m really... (2 Replies)
Discussion started by: ELECTRO
2 Replies

6. UNIX for Dummies Questions & Answers

mini distribution

Maybe someone knows floppy distribution with which I could connect to the internet and browse sites. THanks for answers (1 Reply)
Discussion started by: Vilmis
1 Replies

7. UNIX Desktop Questions & Answers

mini digi-cam

hey guys! I am on a fedora core2 i686 with gui and I have a miniture cool-cam which is digital.. it connects through regular usb.. the system recognizes it and the when I go into the desktop peripheral and go to camera it gives name and tells test was successful.. it also says that the camera has... (0 Replies)
Discussion started by: moxxx68
0 Replies

Featured Tech Videos