Skip to content
i99dev edited this page Apr 24, 2022 · 8 revisions

MiniShell

This project aims to create a simple shell and learn a lot about processes and file descriptors.

The existence of shells is linked to the very existence of IT. All coders agreed that communicating with a computer using aligned 1/0 switches was seriously irritating. It was only logical that they came up with the idea of speaking with a computer using interactive lines of commands in a language close to English. With the Mini shell project, we’ll be able to travel through time and come back to problems people faced when Windows didn’t exist.

Development Process

  • Prompt implementation. -> @Omar
  • HashTable functions implementation. -> @Obaid
  • Tokenizer implementation. -> @Obaid
  • Variables expansion implementation
  • Builtins implementation
  • Parse and execute sistem design
  • Signals implementation
  • Parsing implementation
  • Execute implementation
  • Norme
  • Bugs hunting

Note

  • Environment value two ways to get it.

number One: pass arguments to main functions **env

int main(int argc, char *argv, char **env)
{
  int i;

  i = 0;
  while(env[i])
  {
    printf("%s", env[i]);
    i++; 
  }
}

number Two: use __environ

int main(int argc, char *argv)
{
  int i;

  i = 0;
  while(__environ[i])
  {
    printf("%s", __environ[i]);
    i++; 
  }
}

study_resources

unix

hashtable

tokenizer

more

Clone this wiki locally