facebook twitter hatena line email

Linux/コマンドメモ/cut

提供: 初心者エンジニアの簡易メモ
2015年5月20日 (水) 03:12時点における127.0.0.1 (トーク)による版 (ページの作成:「==先頭xバイト切り出し== vi test.txt aiueo kakikukeko aiueo cut -b-3 test.txt > aiu > kak > aiu ==スペース区切りの文字を取り出して表...」)

(差分) ←前の版 | 最新版 (差分) | 次の版→ (差分)
移動: 案内検索

先頭xバイト切り出し

vi test.txt
aiueo
kakikukeko
aiueo
cut -b-3 test.txt
> aiu
> kak
> aiu

スペース区切りの文字を取り出して表示

vi test.txt
test1 test2 test3
test4 test5 test6
cut -f 1,3 -d " " test.txt
> test1 test3
> test4 test6