プログラミング

Examples of cut command on Linux

Examples of cut command on Linux

2019-01-19 21:43:34 ⌚  541e5aed5dcf in /docker
○ → printf "hogefuga" | cut -c 2-4
oge

2019-01-19 21:43:59 ⌚  541e5aed5dcf in /docker
○ → printf "hogefuga" | cut -c -2
ho

2019-01-19 21:44:08 ⌚  541e5aed5dcf in /docker
○ → printf "hogefuga" | cut -c 4-
efuga

2019-01-19 21:49:11 ⌚  541e5aed5dcf in /docker
○ → printf "hoge,fuga,foo,bar,baz" | cut --fields 2-4 --delimiter ,
fuga,foo,bar

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です