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.
10 GB 前後の巨大なファイルがあります。そして、35 番目の列 (; で区切られている) を置き換えたいと思います。巨大なファイルであるため、エディターでファイルを開くことはできません。ファイルのすべての行で置換を行いたい。
誰かが Sed を使うように勧めてくれましたが、まだ使いこなせていません。誰かが同じことを達成できるUNIXコマンドを提案できますか.
awk -F';' '{ $35 = "replacement" }' < oldfile > newfile
これはうまくいくかもしれません(GNU sed):
sed -i 's/[^;]*/replacement/35' file