0
0

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 1 year has passed since last update.

【Linux】特定の文字列を含む行に文字を追加する方法

Last updated at Posted at 2022-09-13

特定の文字列を含む行に文字を追加する方法

sedコマンドを使用して以下のように実行すると特定の文字列を含む行の行頭または行末に文字を追加することができます。

  • 行頭に追加
sed -e "/検索する文字列/s/^/行頭に追加する文字/"
  • 行末に追加
sed -e "/検索する文字列/s/$/行末に追加する文字/"
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?