Useful links to start : https://www.cs.purdue.edu/homes/grr/SystemsProgrammingBook/Book/Chapter5-WritingYourOwnShell.pdf https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html