X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=ips;h=031cf0b42a93d46a34c903f71a0796b569e512db;hb=dd6776bd8fdbe5e15f2c8928b397512ef15c8f61;hp=45d3625b8c83d30510189a0ae1505c57018a9814;hpb=8a6e42785ddd0e609443fcf3d68d7f3b070ad4a7;p=dell-switch diff --git a/ips b/ips index 45d3625..031cf0b 100755 --- a/ips +++ b/ips @@ -1,3 +1,4 @@ COLS=1 test ! -z "$1" && COLS=$1 -ls log/*.log | cut -d/ -f2 | cut -d_ -f$COLS | sed 's/\./ /g' | sort -n -k 4 | sed -e 's/ /./g' -e 's/_/ /g' +test "`basename $0`" == "hosts" && COLS=1,2 +ls log/*.log | cut -d/ -f2 | cut -d_ -f$COLS | sed 's/\./ /g' | sort -n -k 4 -u | sed -e 's/ /./g' -e 's/_/ /g'