LoginSignup
0
0

More than 1 year has passed since last update.

awk コマンドで特定の箇所の値を取り出す(行と列で指定)

Last updated at Posted at 2021-09-24

(ファイル名)
test.txt

(ファイルの中身)

G:              A:              F:              A:              M: 
google          amazon          facebook        apple           microsoft

(やりたいこと)
"apple"の値だけ取り出したい。

(コマンド)

awk 'NR==2 {print $4}' test.txt

(結果)
apple

(補足)
NRで行指定
$で列指定

0
0
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
0
0