Root/mlt/wpan-ipv4/pex

1#!/bin/sh
2in=$1
3prompt="${1##*/}"
4prompt="${prompt%.*}"
5shift
6{
7    read c
8    while read c; do
9        if [ "${c#!}" != "$c" ]; then
10            eval "${c#!}" </dev/tty
11            continue
12        fi
13        if [ "${c#:}" = "$c" ]; then
14            cmd=$c
15        else
16            c=${c#:}
17            read cmd
18        fi
19        echo -e -n "$prompt> \033[1m$c\033[m "
20        read x </dev/tty
21        eval "$cmd" </dev/tty
22    done
23} <$in
24

Archive Download this file

Branches:
master



interactive