Simple Command Prompt Dengan Bahasa C

Saya sedang mencoba membuat cmd (command prompt) versi saya sendiri. Namun perintahnya masih meminjam milik cmd punya windows. Berikut source codenya, kompilasi menggunakan GCC: #include <stdio.h> #define CLEAR_SCREEN system("cls") #define CHANGE_TITLE system("title Simple Command Prompt"); int main() { CHANGE_TITLE; CLEAR_SCREEN; printf("\n\tWelcome to simple command prompt coded by %s\n\tType\ \"help\" for available command\n\n","ilmusoft.com"); run(); } int run() { char input[512]; char command[512]; printf("Run:> "); gets(input); if (strcmp(input,"ping")==0){ char host[512]; printf("Type destionation host: "); scanf("%s",host); sprintf(command,"ping %s",host); system(command); } else if(strcmp(input,"quit")==0 || strcmp(input,"q")==0){ exit(0); } else if(strcmp(input,"whoami")==0){ system("whoami"); } else if(strcmp(input,"help")==0){ printf("Available command:\n\ whoami\tprint current user\n\ ping\tsend ping request\n\ q\tquit from this console\n\ help\tprint this info\n"); } run(); } Hasil :