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.
file.oot など、ファイルの末尾から一部のデータを取り除こうとしています。
最後の n 行を除くすべてを返す tail コマンドを使用したいと思います。これを csh スクリプトの一部として 1 行のコマンドに制限したいと思います。tail コマンドでこれを行う方法はありますか? そうでない場合、別のオプションはありますか?
次の逆を返すコマンド:
tail -10 file.oot > new_file.oot
ありがとう
私は(文字通り)間違った方向からこれに近づいていたようで、頭を使うべきです。次のコードを使用すると、私の目標が達成されます。
head -n -10 file.oot > new_file.oot