From 9c566a2b37c33a621de2dc73a5b6595a77ad25d6 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Fri, 21 Aug 2015 02:33:39 +0100 Subject: [PATCH] ips args --- etc/profile.d/functions | 3 ++- lib/python/nb.pyc | Bin 1823 -> 1980 bytes 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/profile.d/functions b/etc/profile.d/functions index e91ed5ba..9633d768 100644 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -71,7 +71,8 @@ shell_slogin() { } ips() { - ifconfig | perl -ne '/^\s*inet (?:addr:)?([\d\.]+)/ and $1 ne "127.0.0.1" and print "$1\n"' + shell_help "Usage: $FUNCNAME [INTERFACE]. Print ip adresses." "$@" && return 1 + ifconfig | perl -ne 'BEGIN{$e=shift @ARGV; $e=~s/\W+/|/g}; /^(\w+)\s+/ and $i=$1; /^\s*inet (?:addr:)?([\d\.]+)/ and ($_=$1) ne "127.0.0.1" and (!$e or $i=~/^($e)$/) and print "$_\n"' "$*" } env_add_path() { diff --git a/lib/python/nb.pyc b/lib/python/nb.pyc index 0b6d762a2eb18492152aaab55cc8938784c2171e..6f3d4bd2ae30d229d5990c31bd6b608db0269c4e 100644 GIT binary patch delta 573 zcmYjNJ4?e*6h0?6Nt4)zEyX8l!3S{_TwGMdK?eyDmx_q=MyQV(lDiZtMJu?tlnhSl z>fqMZ!Cn82n~R=vb?}D!-S0fVbMjPtElrBgf`@k>dky$Ig5EW{X{SHwcL5~AnSi>0 zNWh5+(f}!-2Uxd2ns5V9w?SH(uJ_ei1nO=m~hOj|N) zsisM^fdqVcknRRSx=f$|IsiT7@>2oH94Len((YNWw+Mj#6K@5%@FuJWLV4I?9uGNn(p!s zlFjt=FpZBI(F$2G9(@X||LqP%I#qY6ombNvL%k pE*W8%Vwh!^XILQc>1Ls|n0?vhu__rXl{fNO5w7i)UB~rY=Ld!)U#b8A delta 397 zcmYk1F-rq66vyAYBzKo}3%IQJe+IZ2KX) zI5;@#ckoNNtM5gJCcIz%d3pK2M(_Y|D!_^$ zBv=`Q0;__E!Nx%(V3QzHun5N{C6CJ=8iOH{H}szt^M cW0lb(7$C=W?~}af(3WkQQcIodRA)N<1yCS4`v3p{ -- 2.47.3