Compiler version: 9.3.0-17ubuntu~20.04
Run the script gcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c -o hsh
In the interactive mode, execute the file hsh, and then the prompt line will appear
root@ubuntu:/# ./hsh
($)
In the above example, the prompt line waits for the user enters a command to execute it. After the execution, the prompt line appears again. To exit the shell the user just have to write exit or type ctrl + d.
In the non-interactive mode, a command must be passed by pipe
echo "ls -la /tmp | ./hsh"
In the above example, it'll list with long format all the content from the directory /tmp, then the prompt won't appear again.