Thread: shell how to?

  1. #1
    Unregistered
    Guest

    Unhappy shell how to?

    i want to write like a little simple shell prog... but i cant seem to get this part to work all the timez

    [guess@shellerz ]$ <---- i want that to keep going.. like if i was to enter "ls" then i want it to stay as [guess@shellerz ]$ and not to change back to my regular shell... can anyone please tell me how i can start this..? thanx....

  2. #2
    Im back! shaik786's Avatar
    Join Date
    Jun 2002
    Location
    Bangalore, India
    Posts
    345
    Which shell are you using? If it is bash, do:
    Code:
    export PS1="[guess@shellerz ]$ "
    In csh, you can do:
    Code:
    set prompt="[guess@shellerz ]$ "

  3. #3
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    Write the script in an editor like emacs:

    emacs myscript

    Than start the script with the text:
    #!/bin/bash

  4. #4
    Unregistered
    Guest
    ya but i want to creat it in c..... cause i wanted to creat other thingz in there... like a colored shell or an animated text... but i need to know how to code the shell first..

  5. #5
    Registered User
    Join Date
    Aug 2001
    Posts
    202
    Eeek. Bash will do shell colours. What kind of text animation are you talking about? I'm thinking it would probably be easier to learn how to do this in Basdh (or any other pre-existing shell for that matter) than trying to code your own shell. If convenience is what you want, I tend to think it would be more convenient for you to learn what's there.

    starX
    www.axisoftime.com

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 34
    Last Post: 05-27-2009, 12:26 PM
  2. What shell is more powerful?
    By xddxogm3 in forum Tech Board
    Replies: 10
    Last Post: 07-24-2004, 10:47 PM
  3. System.ini Shell Problems
    By (TNT) in forum Windows Programming
    Replies: 2
    Last Post: 08-26-2001, 01:05 PM