ユーザ用ツール

サイト用ツール


tipsmemo:tips:shellscript

差分

このページの2つのバージョン間の差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
tipsmemo:tips:shellscript [2019/12/02 11:11]
hayashi [正規表現]
tipsmemo:tips:shellscript [2021/02/24 14:40] (現在)
hayashi
行 1: 行 1:
 ====== Shellscript ====== ====== Shellscript ======
 +===== コマンド出力を直接diff =====
 +**bash**
 +  diff <(command1) <(command2)
 +
 +**bin/sh**
 +  command1 | ( command2 | diff /dev/fd/3 -) 3<&0
 +
 +===== 連番のゼロパディング =====
 +
 +  seq -f %05g 1 10
 +
 +ただし、桁数が増えると指数表現になるので、その場合はフォーマットをfにして小数点部分を削る
 +
 +  seq -f %08f 1 10000000 | sed -e "s/\.000000//"
  
 ===== 正規表現 ===== ===== 正規表現 =====
tipsmemo/tips/shellscript.1575252719.txt.gz · 最終更新: 2019/12/02 11:11 by hayashi