From 94e97f742008733f68fd526c656d90621b27d643 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Fri, 9 Dec 2011 09:31:29 -0800 Subject: Adjust show interfaces for maximum length of interface name --- scripts/vyatta-show-interfaces.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/vyatta-show-interfaces.pl b/scripts/vyatta-show-interfaces.pl index f999c3c..0cfb720 100755 --- a/scripts/vyatta-show-interfaces.pl +++ b/scripts/vyatta-show-interfaces.pl @@ -250,7 +250,7 @@ sub conv_descriptions { my @descriptions; my $line = ''; foreach my $elem (split(' ', $description)){ - if ((length($line) + length($elem)) >= 29){ + if ((length($line) + length($elem)) >= 24){ push(@descriptions, $line); $line = "$elem "; } else { @@ -263,8 +263,8 @@ sub conv_descriptions { sub run_show_intf_brief { my @intfs = @_; - my $format = "%-12s %-33s %-4s %s\n"; - my $format2 = "%-12s %s\n"; + my $format = "%-16s %-33s %-4s %s\n"; + my $format2 = "%-16s %s\n"; print "Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down\n"; printf($format, "Interface","IP Address","S/L","Description"); printf($format, "---------","----------","---","-----------"); -- cgit v1.2.3