2016-06-18 指定カラムが正規表現にマッチしている行だけ抽出する bash # foo.dat # # foo 2 # bar 3 # hoge 1 # piyo 5 awk '$1~/^hoge/' foo.dat # hoge 1