LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-12-2006, 03:14 PM   #1
Anonymous3
LQ Newbie
 
Registered: Jul 2006
Posts: 1

Rep: Reputation: 0
Writing my shell


I am trying to write a set of C programs each of which is dedicated to one command to be incorporated in my customized shell. The programs are:

mycp : takes 2 args:file1 and file2. This one creates a copy of file1 into file2.

mylnb: takes 3 args: file1, file2, counter. the lines of file1 are then numbered starting with counter and the result is stored in file2, example: mylnb 100 f1 f2 ,This will create f2 with its lines numbered from 100, 101, ...

myshow: 2 options: a type user option and a mode option, the command then diplays a list of all files accessible to the user with its indicated mode.

Please help I have never used C on Linux before and i have reached a dead end.
Thanks
 
Old 07-12-2006, 05:18 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,353
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
Please help I have never used C on Linux before and i have reached a dead end.
I'm sorry, but are you trying to say the course didn't come with any books? Astonishing...
Maybe start with Teach Yourself C in 21 Days then.
 
Old 07-14-2006, 11:50 AM   #3
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
What are you needing help with? the compiler for c programs are gcc. If you do a
Code:
man gcc
then this will give you extra options to use.
 
Old 07-14-2006, 12:09 PM   #4
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
Quote:
Please help I have never used C on Linux before
you probably mean you dont know anything about C.
But I dont think we could help you with that.
Try creating the programs and if you get errors paste the code here and then we might be able to help you out.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help writing a shell script! smoothdogg00 Programming 5 04-26-2006 11:15 AM
[SOLVED] Writing a shell script mattz40 Debian 5 04-13-2005 06:56 PM
shell script writing ust Linux - General 6 01-24-2005 01:06 PM
writing own shell bahuguna_n Programming 9 11-25-2003 02:11 PM
writing a shell hopeless Programming 9 09-04-2002 08:28 AM


All times are GMT -5. The time now is 12:34 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration