$0 -e regex 指定した列に指定した正規表現が合致する場合に、その行全体を出力する。 主要な動作の後に、標準エラー出力に処理した行数などを出力。 $0 -c 列番号 -e 正規表現 # 最も想定されている使い方。 $0 -c 列番号 -f ファイル名 # ファイルの各行に検索したい正規表現があると見なされる。 $0 正規表現 # 列を指定しないで、行全体からマッチすれば、その行を出力 $0 -v -c 列番号 -e 正規表現 # -v の指定により、マッチしない行を出力する。 オプション : -c num : 検索対象を探す列を1個指定する。最左列は1、最右列は-1であり、右に向かうほど1ずつ増加。 -e str ; 正規表現の指定。grep と違って1回のみ。 -f filename : 検索する正規表現が含まれているファイルの指定。各行がOR条件で検索されることになる。 -1 ; -f と共に用いる。ファイル filename の各行のどれかと指定列が一致するもののみを取り出す。高速のはず。 -u ; 文字列の比較は utf8で行う。 -v : 行の選択が反転する(マッチしない行が選択される)。 -y : マッチするかどうかで 1/0のみ各行に出力する。 -q : 何行マッチした、などの付加情報を標準エラー出力に出力しない。 -= ; 先頭行をヘッダと見なし、これに応じた処理をする。 -: ; データの番号を出力する。
開発メモ: * Colgrep がutf8に対応していない colgrep -= -c1 -e '^6307' 1504*c1.csv
$0 - pattern searcher given which column to seek together with regular expression
SYNOPSIS $0 -c $col_num -e $regex # The most usual usage $0 -c $col_num -f $filename $0 -e $regex $0 -v -c .. .. # unmatch ; reverse the matching condition.
OPTIONS You can specify the options which appears as follows .
-c number Specify the column number. Note that the leftest column is numbered as 1. -f filename The file specified by filename is regarded to contain elements separated by line breaks each of which are to specify the pattern to be matched.
To install App::Bin4TSV::6, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Bin4TSV::6
CPAN shell
perl -MCPAN -e shell install App::Bin4TSV::6
For more information on module installation, please visit the detailed CPAN module installation guide.