-
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....
-
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 ]$ "
-
Write the script in an editor like emacs:
emacs myscript
Than start the script with the text:
#!/bin/bash
-
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..
-
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