1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-12-27 20:55:32 +02:00
wernermisc/mlt/wpan-ipv4/pex

24 lines
340 B
Plaintext
Raw Normal View History

#!/bin/sh
in=$1
prompt="${1##*/}"
prompt="${prompt%.*}"
shift
{
read c
while read c; do
if [ "${c#!}" != "$c" ]; then
eval "${c#!}" </dev/tty
continue
fi
if [ "${c#:}" = "$c" ]; then
cmd=$c
else
c=${c#:}
read cmd
fi
echo -e -n "$prompt> \033[1m$c\033[m "
read x </dev/tty
eval "$cmd" </dev/tty
done
} <$in