Custom Shell Script Prompt

Discussion in 'Command Line' started by bashcommando, Apr 30, 2014.

  1. bashcommando

    bashcommando Active Member

    Messages:
    212
    Likes Received:
    43
    Trophy Points:
    28
    I created my own Shell Script Prompt. Its called PCSH(Pretty Cool SHell). Here is the code:
    Code:
    #include <stdio.h>
    
    int main(void)
    {
      char* cmd;
      while (1)
      {
        printf( "PCSH:" );
        scanf( "%d", &cmd );
        system( cmd );
      }
    }
    To compile/install it use in your current prompt:
    Code:
    su - root
    gcc -o pcsh pcsh.c
    chmod 755 pcsh
    cp pcsh /bin/
    pcsh
    Have fun using PCSH V1. You can modify it if you want!

Share This Page