1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/bash if [ $# -gt 0 ]; then echo exec ${@} | vpp_api_test | sed 's/vat# //g' else echo -n "vpp# " while read CMD; do if [ $CMD == "exit" ]; then exit fi echo exec $CMD | vpp_api_test | sed 's/vat# //g' echo -n "vpp# " done fi