Bash-like shell. It's a command-line interpreter
- Prompt with line edition
- Builtins:
[
,alias
,bg
,cd
,echo
,exit
,export
,fc
,fg
,hash
,help
,history
,jobs
,kill
,set
,source
,test
,type
,unalias
,unset
- Executing commands
- Executing command in background
&
- Pipe
|
- Redirections:
>
,>>
,>&
,&>
,&>>
,>|
,<
,<<<
,<&
,&<
- Heredoc:
<<
,<<-
- Logical operands:
&&
and||
- Separators:
;
,&
- Inhibitors:
"
(double quote),'
(simple quote) and\
- Environment and local variables:
$VAR
or${VAR}
- Control groups and sub-shells:
(CMD)
,{CMD}
- Command substitution:
$(CMD)
- Dynamical autocompletion
- History (saved in
~/.42sh.history
) - Tilde expansion and additional parameter formats:
~
,${parameter:-word}
,${parameter:=word}
,${parameter:?word}
,${parameter:+word}
,${#parameter}
,${parameter%}
,${parameter%%}
,${parameter#}
,${parameter##}
- Arithmetic expansion:
$(())
- Contextual dynamic completion of commands, built-ins, files, internal and environment variables. Autocompletion for order/built-ins parameters
- The two editing modes of the vi and emacs command line (
set -o vi
orset -o emacs
) - Shell Script (
if
,while
,until
,for
,case
and function definition) - PS1/PS2 environment variable to custom shell prompt (wiki)
Clone current repository into empty folder "42sh"
$> cd 42sh && make
$> ./42sh
make
compilation of binary executablemake clean
delete all.o
filesmake fclean
delete all.o
files and./42sh
make re
dofclean
thenmake
Commands | Functions |
---|---|
!! |
Last command in history |
!word |
Look for the last command starting by word |
![-]number |
Look for the command at index number , - define that the search starts from the end |
Commands | Functions |
---|---|
alias |
List all the current aliases set |
alias [name[=value] ...] |
Sets an alias for name so it replaces as value internally |
unalias [-a] name [name ...] |
Remove the name arguments of the alias table. -a removes all aliases |
Commands | Functions |
---|---|
hash |
List hash table contents |
hash -r |
Clear the hash table |
Commands | Functions |
---|---|
jobs [n] |
List all the current running jobs, n specify the job you want (the form is in job id form or it can be a numerical value) |
fg [n] |
Bring the specified job to foreground |
bg [n] |
Bring the specified job to background |
A shell compliant with the POSIX Standard.
Name | Github | |
---|---|---|
Aleksandr | [email protected] | https://github.com/ZaprAlex |
Aleksey | [email protected] | https://github.com/TinkiBain |
Vladimir | [email protected] | https://github.com/nefyodovve |
Danila | [email protected] | https://github.com/itynol |
Kirill | [email protected] | https://github.com/wtalea |