pdp shell function, Sort by IP

This commit is contained in:
Keith Whyte 2020-09-22 14:31:09 +02:00
parent 11b477e7fb
commit 635c60ffc7

View file

@ -93,7 +93,7 @@ b<%= index %>() {
<% end -%> <% end -%>
pdp () { pdp () {
expect -c 'spawn -noecho telnet 0 4245; expect >; send enable\r; expect #; send "show pdp-context all\r"; expect #' | grep "PDP Address" | grep -v invalid | sort; expect -c 'spawn -noecho telnet 0 4245; expect >; send enable\r; expect #; send "show pdp-context all\r"; expect #' | grep "PDP Address" | grep -v invalid | sort -t. -n -k3,3n -k4,4n;
echo Count: $(pdpc) echo Count: $(pdpc)
} }