0
1

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.

便利なシェルシェルスクリプトまとめ

Posted at

随時追加予定

実行ディレクトリ配下の全てのファイルに対して、XXXXXという記述が含まれるファイルを出力する

grep 'XXXXX' -rl .

実行ディレクトリ配下のすべてのファイルの中身に対して、XXXXXと書かれているところをYYYYYに置換する

for file in $(find . -type f -print | xargs grep 'XXXXX'); do sed -i -e "s/XXXXX/YYYYY/g" ${file%:}; done;
0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?