I have a simple while loop accepting input:
#!/bin/bash while true; do read -rep $'\n '"$USER"'> ' userInput echo "$userInput" done
./input.sh username> command1 command1 username> command2 command2
Is it possible to have a command history? So that I can press up on my keyboard to view the previously executed commands (without leaving the while loop)?