The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Mini-XML 2.5 (Default branch) iBot Software Releases - RSS News 0 01-29-2008 07:00 AM
mini shell programming (help) ELECTRO UNIX for Dummies Questions & Answers 2 10-27-2006 07:32 AM
mini distribution Vilmis UNIX for Dummies Questions & Answers 1 12-28-2005 05:03 AM
Using make utility to create an mini-app Yifan_Guo High Level Programming 1 03-19-2005 01:35 AM
mini digi-cam moxxx68 UNIX Desktop for Dummies Questions & Answers 0 11-16-2004 02:37 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-05-2001
Registered User
 

Join Date: Jun 2001
Location: USA
Posts: 3
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



__________________
Passat
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 07-01-2005
zylwyz's Avatar
Registered User
 

Join Date: Jun 2005
Location: I'm living in Unix :)
Posts: 53
Red face

Have you ever hear something about system() ?
Reply With Quote
  #3 (permalink)  
Old 07-01-2005
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,643
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
Reply With Quote
  #4 (permalink)  
Old 07-01-2005
zylwyz's Avatar
Registered User
 

Join Date: Jun 2005
Location: I'm living in Unix :)
Posts: 53
Angry

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?
Reply With Quote
  #5 (permalink)  
Old 07-01-2005
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,643
Quote:
Originally Posted by zylwyz
This remark was for me?
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`.

Cheers
Vino
Reply With Quote
  #6 (permalink)  
Old 07-01-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,354
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.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:43 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0