grepで先頭1文字目を判定する
以下のようなテキストを
hoage@hogehoge[hoge]$ cat hogehoge.dat a b c d e f g h i
先頭1文字目がaとgのものだけを抽出できたりする
hoge@hogehoge[hoge]$ cat hogehoge.dat | grep -E '^a|^g' a b c g h i
以下のようなテキストを
hoage@hogehoge[hoge]$ cat hogehoge.dat a b c d e f g h i
先頭1文字目がaとgのものだけを抽出できたりする
hoge@hogehoge[hoge]$ cat hogehoge.dat | grep -E '^a|^g' a b c g h i