LoginSignup

This article is a Private article. Only a writer and users who know the URL can access it.
Please change open range to public in publish setting if you want to share this article with other users.

More than 3 years have passed since last update.

cut

Posted at

できること

  • 一行の文字列データから特定の範囲でデータを抽出する

基本構文

$ cut ファイル オプション

よく使う構文

CSVデータから特定の列を抽出

$ cut ファイル -f 1,3 -d ","

よく使うオプション

特定のフィールドを抽出

$ cut -f 1,3

1, 3列目を抽出

ディミリタを変更

$ cut -d ":"

ディミリタを:に変更。デフォルトはタブ。

その他

awk
https://qiita.com/yachinco/private/aa594652db6e21005d98

0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up