diff options
Diffstat (limited to 'bash/step0_repl.sh')
| -rwxr-xr-x | bash/step0_repl.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/bash/step0_repl.sh b/bash/step0_repl.sh new file mode 100755 index 0000000..261ecc2 --- /dev/null +++ b/bash/step0_repl.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +READ () { + read -u 0 -e -p "user> " r +} + +EVAL () { + r= + eval "${1}" +} + +PRINT () { + r="${1}" +} + +while true; do + READ + EVAL "${r}" + PRINT "${r}" + echo "${r}" +done |
