Can anybody help me making a simple unix shell? Using fork() and execlp commands in linux
| |
|
Welcome to KnowledgeSutra - Dear Guest | |
Making A Simple Unix Shell?
Started by it01y2, Dec 19 2009 12:01 PM
2 replies to this topic
#3
Posted 20 December 2009 - 11:31 AM
Im just wondering how i can pass multiple parameters in this instance:
Prompt the user to enter a program name and then add a flag:
e.g:Program Name: ls First Parameter: -l (and so on....)
so... Program var is : ls, parameter var 1 = -l, parameter var 2 = etc. ......
Prompt the user to enter a program name and then add a flag:
e.g:Program Name: ls First Parameter: -l (and so on....)
so... Program var is : ls, parameter var 1 = -l, parameter var 2 = etc. ......
char program[256]; char *parameters=NULL; execlp(program,program,parameters, (char *)0);
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users














