filmov
tv
C - Build Your Own Shell in C, Zsh Implementation Part 2: Implementing Core Built-In Commands

Показать описание
In Part 2 of our custom shell-building tutorial, we’ll implement essential built-in commands like cd, pwd, echo, and env. These commands are the backbone of a shell’s functionality, and by the end of this video, your shell will be able to handle these operations effectively.
Code:
Timestamps:
[00:00] Introduction: Overview of Part 2 and what we’ll cover.
[04:18] Implementing cd: Navigating directories and handling edge cases.
[15:50] Adding pwd: Printing the current working directory.
[24:05] Creating echo: Printing strings and interpreting environment variables.
[40:50] getenv() implementation
[42:40] strlen() implementation
[46:55] strncmp() implementation
[54:40] Debugging :)
[01:01:15] Implementing env: Displaying all environment variables.
[1:04:15] Conclusion and What's next?
Stay tuned for Part 3, where we’ll add the which command to enhance our shell’s functionality!
Code:
Timestamps:
[00:00] Introduction: Overview of Part 2 and what we’ll cover.
[04:18] Implementing cd: Navigating directories and handling edge cases.
[15:50] Adding pwd: Printing the current working directory.
[24:05] Creating echo: Printing strings and interpreting environment variables.
[40:50] getenv() implementation
[42:40] strlen() implementation
[46:55] strncmp() implementation
[54:40] Debugging :)
[01:01:15] Implementing env: Displaying all environment variables.
[1:04:15] Conclusion and What's next?
Stay tuned for Part 3, where we’ll add the which command to enhance our shell’s functionality!