labunix's blog

labunixのラボUnix

2018-08-01から1日間の記事一覧

awkで記号をエスケープしたいときに使う、文字と8進数の一覧

■awkで記号をエスケープしたいときに使う、文字と8進数の一覧 よく使うのは「\042」と「\047」。 $ echo "`seq 32 126`" | awk '{printf "%c,\\%03o\n",$1,$1}' ,\040 !,\041 ",\042 #,\043 $,\044 %,\045 &,\046 ',\047 (,\050 ),\051 *,\052 +,\053 ,,\054…

複数の検証環境にmate-terminal+expectでtelnet自動ログインしてみる。

■複数の検証環境にmate-terminal+expectでtelnet自動ログインしてみる。 以下に当てはめる。 mate-terminal --tab -e [command] --tab -e [command] ... ■KVMホスト側での待受ポートを設定 $ for n in `seq 21 23` `seq 31 34`;do socat tcp-listen:${n}23,f…