#author("2019-07-30T18:12:11+09:00","Group2","Group2")
#freeze
#author("2020-04-13T16:48:10+00:00","","")
[[hidekiwiki]]
#html{{
<meta name="description" content="http://fukumoto-tech.serveblog.net/wiki/" />&#160;
<meta name="keywords" content="hidekiwiki,sedコマンド,CentOS7,URL,置換,一括" />&#160;
<link rel="canonical" href="http://fukumoto-tech.serveblog.net/wiki/" />
<meta name="description" content="https://fukumoto.tokyo/wiki/" />&#160;
<meta name="keywords" content="sedコマンド,URL,置換,一括" />&#160;
<link rel="canonical" href="https://fukumoto.tokyo/wiki/" />
<br>
<a href="http://it.blogmura.com/linux/"><img src="http://it.blogmura.com/linux/img/linux80_15_darkgray_1.gif" width="80" height="15" border="0" alt="にほんブログ村 IT技術ブログ Linuxへ" /></a><br /><a href="http://it.blogmura.com/linux/">にほんブログ村</a>
<a href="httpss://it.blogmura.com/linux/"><img src="https://it.blogmura.com/linux/img/linux80_15_darkgray_1.gif" width="80" height="15" border="0" alt="にほんブログ村 IT技術ブログ Linuxへ" /></a><br /><a href="https://it.blogmura.com/linux/">にほんブログ村</a>
<!-- admax -->
<script src="http://adm.shinobi.jp/s/1a0429ab1f292195e9a461469817a0ca"></script>
<script src="httpss://adm.shinobi.jp/s/1a0429ab1f292195e9a461469817a0ca"></script>
<!-- admax -->
</html>
}}
[[sedコマンドでURL変更する]]

**特定のファイルのみURLの文字列を一括置換するsedコマンド [#x35be12f]
 sed -i -e "s|http://変更前URL|https://変更後URL|g" 変更対象のファイル名

**カレントディレクトリ直下全てのファイルのURL文字列を一括置換するコマンド [#r94bc994]
 find . -type f -print0 | xargs -0 sed -i -e "s|http://変更前URL|https://変更後URL|g"


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS