Improve 2012/endoh1/try.sh
This commit is contained in:
1 parent
ad703d3188
commit
996f716fe1
1 file changed
+10
-4
+10
-4
@@ -17,11 +17,17 @@ clear
|
|||||||
|
|
||||||
run()
|
run()
|
||||||
{
|
{
|
||||||
local program="$1"
|
if [[ "$#" -eq 0 ]]; then
|
||||||
echo "" 1>&2
|
echo "$0: run() expects at least 1 arg, got: $#" 1>&2
|
||||||
read -r -n 1 -p "Press any key to run: ./${program} (space = next page, q = quit): "
|
return
|
||||||
"./${program}" | less -K -E -X
|
fi
|
||||||
|
|
||||||
|
echo 1>&2
|
||||||
|
read -r -n 1 -p "Press any key to run: ./$1 (space = next page, q = quit): "
|
||||||
|
echo 1>&2
|
||||||
|
./"$1" | less -rKEXF
|
||||||
}
|
}
|
||||||
|
|
||||||
run pi
|
run pi
|
||||||
run 314
|
run 314
|
||||||
run 3141
|
run 3141
|
||||||
|
|||||||
Reference in new issue
Block a user