3 # Present a list of shell commands by single-stepping and echoing commands.
4 # Note that this only works well for self-contained single lines, no multi-line
7 # (c) 2009 Martin Pitt <martin@piware.de>
8 # License: Public Domain
11 echo "Usage: $0 <shell script>" >&2
16 echo -en "\e[31m\$\e[30m "
19 # paragraph clears screen
20 if [ -z "$line" ]; then
22 echo -en "\e[31m\$\e[30m "
27 if [ "${line:0:1}" = "#" ]; then
28 if [ -n "${line:1}" ]; then
29 echo -e "\r\e[32m$line\e[30m"
30 echo -en "\e[31m\$\e[30m "
39 echo -en "\n\e[31m\$\e[30m "