6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

sedで置換して別ファイルに保存

Last updated at Posted at 2018-03-05

sedを使った置換のメモ。
読み方はsed(セド)らしい。

#置換前のファイル

sample.txt
androidアプリをダウンロード
私の携帯はandroidだ
iOSからandroidへ移行する

#置換だけする
androidの頭文字を大文字から小文字へ置換だけ行う。

sed s/android/Android/ sample.txt

#置換して別ファイルに保存する
置換してnew_sample.txtに保存する。

sed s/android/Android/ sample.txt > new_sample.txt

以上。

6
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?