From 5ff164bea3ab8b5c96ee52d8f9aff9541d329063 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sat, 12 Nov 2016 16:24:19 +0000 Subject: [PATCH] bytes2h --- etc/profile.d/functions | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/etc/profile.d/functions b/etc/profile.d/functions index ff86da5e..dba6bdf6 100644 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -167,15 +167,13 @@ bytes2h() { #s/$exp/bytes2h($1)/ge; $in | perl -pe ' BEGIN{ - use NB::Functions qw/&bytes2h/; + use NB::Functions qw/bytes2h/; $exp = "([\\d\\.]+)"; if (@ARGV and $ARGV[0] =~ /regex=(\S+)/) { shift @ARGV; $exp = $1; } -}; -0 and s/$exp/format_bytes($1)/ge -' $args +}; s/$exp/bytes2h($1)/ge;' $args } yaml2perl() { -- 2.47.3