Skip to content

lohhiiccc/Minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minichel

build-in:

  • echo

    • echo [option] - display all arg(s)

      • -n do not output the trailing newline
      $ echo salut
      salut
      $ echo -n salut
      salut$ 
  • pwd

    • pwd - print current working directoey
      $ pwd
      /home
  • cd

    • cd [opt/path](optional) - change the working directory
      • - => cd $OLDPWD
      • path => cd path
      • nothing => cd $HOME
      $ pwd && cd .. && pwd
      /home/loic/Documents/Minishell
      /home/loic/Documents
      $ cd - && pwd
      /home/loic/Documents/Minishell
  • env

    • env - display environement variable
  • unset

    • unset [var] - unset var from env
      $ unset PWD
      $ echo -n |$PWD|
      ||$
  • export

    • export [varname]=[value]
      $ export arg='export test'
      $ env | grep arg
      arg=export test
  • return

    • return [integer](optional) - do nothing and return the first argument
      $ return
      $ echo -n $?
      0$ return 5 || echo value: $?
      value: 5
  • exit

    • exit [value](optional) - exit shell and return value

🙇 Author

About

Project is about creating a simple shell.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published