]> git.nbdom.net Git - nb.git/commitdiff
bytes2h
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 12 Nov 2016 16:24:19 +0000 (16:24 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 12 Nov 2016 16:24:19 +0000 (16:24 +0000)
etc/profile.d/functions

index ff86da5e7ec66e71e1772721a813e4f63bf635ec..dba6bdf6f1147cc82f1f4f41e9aa2c4082aa8ec4 100644 (file)
@@ -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() {