Skip to content

cozy-hn/4_2_m_i_n_i_s_h_e_l_l

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MINISHELL

Screen Shot 2024-03-05 at 9 11 07 PM

과제 목표

  • Bash Manual을 참고하여 쉘을 구현한다
  • Recursive descent parser
  • Inter Process Communication

Bash Manual

구현 기능

  • 기본적인 쉘 기능
  • Built-in 명령어
  • 환경변수
  • 상대경로, 절대경로
  • 파이프
  • 리다이렉션
  • 시그널

flow chart

EBNF for recursive descent parser

- <pipe> ::= <group> “ | ” <group> |  <group> “|” <pipe>
- <group> ::= <cmd> | <redir> <cmd>
- <cmd> ::= <ex_cmd> | <cmd> <option>
- <redir> ::= <redirection> | <redir> <redirection>
- <redirection> ::= “<” <file> | “>” <file> | “>>” <file> | “<<” <limiter>

Tree with commands

Screen Shot 2024-03-05 at 9 26 46 PM

Screen Shot 2024-03-05 at 9 25 37 PM

Screen Shot 2024-03-05 at 9 23 25 PM

Built-in

env 환경 변수 목록을 출력
export 환경변수를 설정하거나 환경변수 목록을 출력
unset 환경변수를 삭제
pwd 현재 디렉토리 출력
cd 디렉토리 변경
exit 쉘 종료 (파이프 제외)
echo - n 문자열 출력, n옵션은 줄바꿈을 하지 않음

실행 방법

git clone
make
./minishell

실행 예시

Screen Shot 2024-03-05 at 9 05 43 PM

Screen Shot 2024-03-05 at 9 05 17 PM

Screen Shot 2024-03-05 at 9 06 55 PM

Screen Shot 2024-03-05 at 9 06 12 PM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published