LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ho to implement a minishell (bash) (https://www.linuxquestions.org/questions/linux-newbie-8/ho-to-implement-a-minishell-bash-240480/)

twista 10-09-2004 02:40 AM

ho to implement a minishell (bash)
 
Hi to everybody! i got a problem...
i have to realize a minishell that read a row digited (with "read" command and REPLY variable), and execute all commands i digit (if the row is a real command... ).
If row that i insert starts with "!" the minishell must act in different ways: it depends by the second caracter digited (if it is "!" or "n" or "?").
To memorize commands i insert i got to use HISTORY variable; when minishell complete his work, HISTORY must be saved on a file.

If anybody can help me, i'll be thankful. I've just entered the shell scripting world...so i'm just a dummy
Thanks again!

Twista

sir_nawaz959 10-09-2004 02:50 AM

Hi,
I think u can use system calls if u r using c or c++....in that u have to include some header files like <sys/unistd.h> <sys/types.h> <sys/fcntl.h> etc...


All times are GMT -5. The time now is 11:35 PM.