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.
大きなテキスト ファイル (長さ約 30,000 行) があり、そこから行の範囲 (行番号 5 ~ 30) を削除する必要があります。これはバッチを使用して可能ですか?
どうもありがとう
バッチはそれを行うことができますが、パフォーマンスが低下し、有害な文字が問題になる可能性があり、ファイルの構成が重要になる可能性があります.
GnuSed をダウンロードして、次のコマンドを実行します。
sed 5,30d "file.txt" >"file2.txt"