Shell01 42 ⚡ Full HD
The official goal of Shell01 is simple: "Introduction to basic commands and the manipulation of files and directories." However, anyone who has passed through 42’s common core knows the reality:
Writing a manual counter with awk . Elegant Solution: sed -n 'p;n' (print, then skip next line). Key lesson: Learn sed 's addressing modes. One-liners beat multi-liners. 4. r_dwssap - The Mirror of /etc/passwd Prompt: Take /etc/passwd , keep every other line starting from the 2nd, reverse login order, swap : for spaces, and print only users with a specific shell. shell01 42
Using ls -R | wc -l (which miscounts hidden files and directory names). Solution: find . -type f -o -type d | wc -l Key lesson: find is your best friend. ls is your enemy for scripting. 3. skip - The Seduction of sed Prompt: Print every other line (starting from the first). The official goal of Shell01 is simple: "Introduction
Many beginners try basename or complex string manipulation. Solution: Use find , sed , or basename with parameter expansion. One-liners beat multi-liners