Mong-Shell Reference Manual
██╗ ██╗████████╗██╗ ██╗████████╗ ████████╗██╗ ██╗████████╗██╗ ██╗
███╗ ███║██╔═══██║███╗ ██║██╔═════╝ ██╔═════╝██║ ██║██╔═════╝██║ ██║
██╔██╗██║██║ ██║██╔██╗██║██║ ████╗ ████████╗████████║██████╗ ██║ ██║
██║╚═╝██║██║ ██║██║╚═███║██║ ╚═██║ ╚═════██║██╔═══██║██╔═══╝ ██║ ██║
██║ ██║████████║██║ ╚██║████████║ ████████║██║ ██║████████╗████████╗████████╗
╚═╝ ╚═╝╚═══════╝╚═╝ ╚═╝╚═══════╝ ╚═══════╝╚═╝ ╚═╝╚═══════╝╚═══════╝╚═══════╝
M O N G S H E L L $
This project is about creating a simple shell.
learn: a lot about processes and file descriptors.
$ git clone https://github.com/ejaee/42Minishell
$ ./minishell
- GNU bash, version 3.2.57
-
"command"
$bash-shell: [Run] command
$mong-shell: [Run] command
-
"'command'"
$bash-shell: [Error] bash: 'command': command not found
$mong-shell: [Error] mong: 'command': command not found
-
'"command"'
$bash-shell: [Error] bash: "command": command not found
$mong-shell: [Error] mong: "command": command not found
-
""'command'""
$bash-shell: [Run] command
$mong-shell: [Error] mong: 'command': command not found
-
''"command"''
$bash-shell: [Run] command
$mong-shell: [Error] mong: "command": command not found
-
"""'command'"""
$bash-shell: [Error] bash: 'command': command not found
$mong-shell: [Error] mong: 'command': command not found
-
"command
$bash-shell: [Pause] >
$mong-shell: [Error] fail: Wrong input(quote)
-
"'command"'
$bash-shell: [Pause] >
$mong-shell: [Error] fail: Wrong input(quote)
-
echo "$key"
$bash-shell: [env] $value
$mong-shell: [env] $value
-
echo '$key'
$bash-shell: [String] $key
$mong-shell: [String] $key
-
echo "'$key'"
$bash-shell: [env] '$value'
$mong-shell: [env] '$value'
-
echo '"$key"'
$bash-shell: [String] "$key"
$mong-shell: [String] "$key"
-
echo '"$key"'
$bash-shell: [env] '$value'
$mong-shell: [env] '$value'
-
echo "'"$key"'"
$bash-shell: [env] '$value' $mong-shell: [env] '$value'
-
echo ""'"$key"'""
$bash-shell: [String] "$key"
$mong-shell: [env] '$value'
when first 'quote char' find, saved to config.arr and erase another quote char in buf.
when echo run, config.arr's value is the criterion for print enf.
when quote not enough, mong-shell don't wait for input.
print message "fail: Wrong input(quote)" and get input again.
Mong shell must implement the following builtins:
echo
with option -ncd
with only a relative or absolute path ◦ pwd with no optionsexport
with no optionsunset
with no optionsenv
with no options or argumentsexit
with no options
- [Allowance function theorem)][] - private
- bash reference