script -fq >(awk '{print strftime("%F %T ") $0}{fflush()}'>> PATH) # Linux
script -Fq >(awk '{print strftime("%F %T ") $0}{fflush()}'>> PATH) # Mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"time" | |
"github.com/blacknon/gexpect" | |
) |
echo 192.168.100.9/28|perl -aF[./] -lne'for($i=0;$i<4;$i++){$x.=sprintf("%08b",$F[$i])}$y=$F[4];$k=substr($x,0,$y);$m=2**(32-$y);for($j=0;$j<$m;$j++){$a=$k.sprintf("%0".(32-$y)."b",$j);for($n=0;$n<4;$n++){$b.=".".sprintf(oct("0b".substr($a,$n*8,8)))};$b=~s/^\.//g;print $b;$b=""}'
# もうちょっと短くして改行したもの
echo 192.168.100.9/28|perl -aF[./] -E'
$x.=sprintf("%08b",$F[$_])for 0..3;
$y=$F[4];$z=32-$y;
$m=2**$z;
s@s:~$ unzip -l test1/test-1.zip
Archive: test1/test-1.zip
Length Date Time Name
--------- ---------- ----- ----
35 2017-05-12 19:05 aaa.txt
6 2017-05-12 18:55 bbb.txt
6 2017-05-12 18:56 ccc.txt
--------- -------
47 3 files
NewerOlder