Skip to content

Instantly share code, notes, and snippets.

@csskysea
Created October 26, 2022 03:45
Show Gist options
  • Save csskysea/00cdd846c57f44805899fa51fe364fed to your computer and use it in GitHub Desktop.
Save csskysea/00cdd846c57f44805899fa51fe364fed to your computer and use it in GitHub Desktop.
使用sed 结合find 替换某个目录下所有包含某个字符串的行
#example
find ./k8s -type f -exec sed -i 's/.*ttlSecondsAfterFinished.*/ ttlSecondsAfterFinished: {{ job_ttlsecs_afterfinished | default('3600') }}/g' {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment