Skip to content

Instantly share code, notes, and snippets.

@t11a
Created March 1, 2013 07:49
Show Gist options
  • Save t11a/5063124 to your computer and use it in GitHub Desktop.
Save t11a/5063124 to your computer and use it in GitHub Desktop.
tsvファイルの先頭の文字列をチェックしてヒットしたものを出力するワンライナー。 某プロジェクトで必要になったもの。
$ ruby -ne 'if $_.split("\t").first.to_i == 1 then puts $_ else end' test.tsv > 1.tsv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment