aboutsummaryrefslogtreecommitdiff
path: root/tutorial.sh
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2023-11-25 14:57:19 -0500
committerBruce Hill <bruce@bruce-hill.com>2023-11-25 14:57:19 -0500
commite6e482054de77f3fe5d65344da86065373cf5f23 (patch)
treea6876c73bccf490512be5ff93fa808f3ce8d1c95 /tutorial.sh
parente0a55ba6176df325b65b1768bba929805444bf88 (diff)
Deprecate '-p' flag and replace backslash interpolation with curly brace
interpolation
Diffstat (limited to 'tutorial.sh')
-rwxr-xr-xtutorial.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tutorial.sh b/tutorial.sh
index 70f87dd..7e66132 100755
--- a/tutorial.sh
+++ b/tutorial.sh
@@ -12,12 +12,12 @@ for t in $([ $# -gt 0 ] && echo "$@" || ls -v tests/*.sh); do
printf "\033[33;1mGiven these lines: Give this output:\033[m\n"
diff -y -W60 --color=always "${t/.sh/.in}" "${t/.sh/.out}"
while true; do
- printf "\n\033[1m$ bp --pattern ''\033[D\033[m"
+ printf "\n\033[1m$ bp \033[m"
read -r pat
pat="${pat%\'}"
- printf "\033[0;2mRunning: \033[32m%s\033[m\n\n" "bp -p '$pat'"
+ printf "\033[0;2mRunning: \033[32m%s\033[m\n\n" "bp '$pat'"
printf "\033[33;1mExpected output: Your pattern's output:\033[m\n"
- bp -p "$pat" < "${t/.sh/.in}" 2>"$tmpfile" | diff -y -W60 --color=always "${t/.sh/.out}" - && break
+ bp "$pat" < "${t/.sh/.in}" 2>"$tmpfile" | diff -y -W60 --color=always "${t/.sh/.out}" - && break
cat "$tmpfile"
printf "\n\033[0;1;31mSorry, try again!\033[m\n"
done