- ๐ Data Science (interests in Statistics, Big Data)
- ๐ Devops, CI/CD with Github Actions, Docker(& Docker Compose), AWS, Vagrant
cos18 / minishell Goto Github PK
View Code? Open in Web Editor NEWAs beautiful as a shell
As beautiful as a shell
Libft์ split๊ณผ ์ ์ฌํ๊ฒ ๋ฐ์์จ ์ ๋ ฅ๊ฐ์ ํ ํฐ ๋จ์๋ก ๋๋ char ๋๋ธ ํฌ์ธํฐ๋ก ์ ์ฅํด์ผ ํฉ๋๋ค.
2021-01-04 18์ ์จ๋ผ์ธ ๋ฏธํ ์ ๊น์ง
์์๋ฐ์ํ ์์์์ ์ญ์ฌ๋์ฌ์, ํฐ๋ฐ์ํ ์์์์ ์ญ์ฌ๋์ฌ๋ฅผ ์ฒ๋ฆฌํด์ผ ํฉ๋๋ค.
> echo ~
/Users/sunpark
์ด๋ฐ์์ผ๋ก ~๋ฅผ ๋ณ์์ฒ๋ผ ๋์ฒดํด์ผ ํจ
CMD < FILE
ํ์์ ๋ช
๋ น์ด๋ฅผ ์ฒ๋ฆฌํด์ผ ํจ
pwd without any options
์
๋ ฅ์ผ๋ก ๋ค์ด์์ ๋ ํฐ ๋ฐ์ํ("
)๋ ์์ ๋ฐ์ํ('
)๊ฐ ๋ค์ด์์ ๋ ์ฌ๋ฌ๊ฐ์ง ์ฒ๋ฆฌ๋ฅผ ํด์ผํฉ๋๋ค.
minishell$ echo 'hello"
> "world''
> aaa'test
> '
END
2021-01-04 18์ ์จ๋ผ์ธ ๋ฏธํ ์ ๊น์ง
#6 ๋ฅผ ์ํํ ์ดํ ์งํํ ์์
CMD | CMD
ํ์์ ๋ช
๋ น์ด๋ฅผ ์ฒ๋ฆฌํด์ผ ํจ
CMD; CMD
ํ์์ผ๋ก ์ฌ๋ฌ ์ปค๋ฉ๋๊ฐ ๋ค์ด์ค๋ ๊ฒ์ ์ฒ๋ฆฌํด์ผ ํจ
Token ๋จ์๋ก ์ชผ๊ฐ์ง ๋ช
๋ น์ด๋ฅผ ๊ตฌ์กฐ์ฒด์ ๋ฃ์ด ์ดํ ์ฌ๋ฌ ๋ช
๋ ์ด ํจ์์ ์ํด ์ฒ๋ฆฌ๋ ์ ์๊ฒ pre-processingํ๋ ๊ธฐ๋ฅ์ ๋ฃ์ด์ผ ํฉ๋๋ค.
์ด๋ ๊ตฌํ๋ ํจ์๋ก ์คํ์ํฌ์ง ์์คํฌ ๋ด๋ถ์์ ์คํ์ํฌ์ง ๊ตฌ๋ถํด์ฃผ๋ ๋ณ์๋ ๊ตฌ์กฐ์ฒด์ ๋ฃ์ด์ผ ํฉ๋๋ค.
Expected
minishell$ echo -n -n -n test tout
test toutminishell$
Now
minishell$ echo -n -n -n test tout
-n -n test toutminishell$
ํ ํฐํ๋ ๋ช ๋ น์ด๋ค์ ์ปค๋ฉ๋ ๋จ์๋ก ์ชผ๊ฒ์ผ ํจ
CMD > FILE
๋๋ CMD >> FILE
ํ์์ผ๋ก CMD์ STDIN์ FILE๋ก ์ถ๋ ฅํด์ค์ผํจ.
Subject์ ๋ช ์๋์ด์๋ ๊ธฐ๋ฅ์ ๊ตฌํํด์ผ ํฉ๋๋ค.
Search and launch the right executable (based on the PATH variable or by using relative or absolute path) like in bash
execve ํจ์๋ฅผ ์ฌ์ฉํด์ผ ํฉ๋๋ค.
exit without any options
export
, unset
๋ช
๋ น์ด ์ฒ๋ฆฌ์ argument๊ฐ ์๋ ๊ฒฝ์ฐ segfault๊ฐ ์ผ์ด๋ฌ์ต๋๋ค.
;
>
>>
<
|
์ด ๋ค์ฏ๊ฐ์ง์ ๋ฌธ์์ ๋ํด์๋ ์ถ๊ฐ๋ก ์คํ๋ฆฟ์ ํด์ผ ํจ
echo with option โ-nโ
ํ๊ฒฝ๋ณ์ ํธ๋ค๋ง๋ ๊ฐ์ด ํด์ผํจ
cd with only a relative or absolute path
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.