2009-01-08 sed メモ shell ファイルの文字置換 cat 入力ファイル|sed "s/置換対象文字列/置換文字列/" > 出力先ファイル (出力先ファイルを省略時、標準出力へ出力) ex. cat hoge.txt |sed "s/#{foo_bar}/hogehoge/" > hoge_hoge.txt hoge.txt内の#{foo_bar}と言う文字列を、hogehogeに置換して、 hoge_hoge.txtに出力する。