1
0
Fork 0
mirror of https://github.com/NeoCloud/NeoNetwork synced 2024-06-18 20:48:41 +08:00

pretty-output: up

This commit is contained in:
Neo_Chen 2020-04-30 21:42:12 +08:00
parent e5f00831b5
commit f6c4b39a90

View file

@ -99,7 +99,7 @@ if [ $# -lt 1 ]; then
"Usage: table-output.sh <table type>\n" \
"\n" \
" table types:\n" \
" asn, route, route6, people, node\n"
" asn, route, people, node\n"
fi
arg="$2" # Optional argument
@ -114,17 +114,17 @@ asn)
"$OWNER" "$NAME" "$DESC"
done
;;
route|route6)
cd route
for i in *; do
subnet="${i/,/\/}"
route)
for i in route*/*; do
subnet="${i#route*/}"
subnet="${subnet/,/\/}"
source "$i"
case "$TYPE" in
TUN30) print_tun30 "$subnet" "$PROTO" "$UPSTREAM" "$DOWNSTREAM";;
SUBNET) print_subnet "$subnet" "$NAME" "$DESC";;
PTP) print_ptp "$subnet" "$PROTO" "$UPSTREAM" "$DOWNSTREAM";;
LO) print_lo "$subnet" "$NAME" "$DESC";;
*) errmsg "Invalid \$TYPE in this file\n";;
*) errmsg "Invalid \$TYPE in $i\n";;
esac
done
;;