Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は次のようなフィールドを持っています
a_b_c_d
出力ab c_dとして欲しいのですが、このクエリはこれでは機能しません
awk -F"_" <file> | '{print $1,$2,$3}'
abcのみを出力するため
試す
awk -F"_" -f <file> '{ print $1" "$2" "$3"_"$4 }'
言い換えると、
$echo a_b_c_d | awk -F"_" '{ print $1" "$2" "$3"_"$4 }' a b c_d
括弧内のコードは、