Jump to content

Shell prompt

- - - - -

  • Please log in to reply
5 replies to this topic

#1
Mumble

Mumble

    Newbie

  • Members
  • PipPip
  • 14 posts
Hi,

I am developing an application where I need to develop a shell prompt using C. What would be the basic steps to code this?

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
1) decide what shell commands you will support.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Mumble

Mumble

    Newbie

  • Members
  • PipPip
  • 14 posts
Basic commands for cecking the input and terminating it.

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
such as?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
Mumble

Mumble

    Newbie

  • Members
  • PipPip
  • 14 posts
Using functions like cat, exit() , sleep(), check the status of the commands entered.

#6
Warrior

Warrior

    Programmer

  • Members
  • PipPipPipPip
  • 130 posts
Elaborate!

What you gonna do?....if you are to use the shell commands which are already there in the OS than use popen() to open pipe for I/O.
Or if you are going to write them yourself again...read the source code of them.(gnu utils are open source,read them)
I also coded some small implementations of the coreutils.You can see them here if you like
http://flashcore.wordpress.com/

Warrior
Be a joke unto yourself!
Check out my blog at Flashcore




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users