はじめに 最近Linuxでコマンドの出力結果やファイルに文字列を追加したり削除する方法について説明する機会が多いので、備忘録も兼ねてコマンドの使い方を記載しておきます。 よく紹介されているsedコマンド以外の方法も記載しているので、用途に合った方法を選んでもらえればと思います。 sedコマンドの先頭行・末尾行の操作方法 sedコマンドは文字列を置換をするコマンドとして有名ですが、文字列の追加や行の削除・抽出も行える非常に強力なコマンドです。 とりあえずsedコマンドを知っていればコマンドの出力結果(標準出力)やファイルの行の操作は何とかなりますので、覚えておくことをオススメします。 ・行を追加する(標準出力) コマンドの実行結果(標準出力)のテキストの先頭行や末尾行に追加したい文字列の行を追加する方法です。 【コマンドの書き方】
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く