Article View: fj.lang.perl
Article #164Re: Change Filenames in the HTML
From: Maki Watanabe
Date: Tue, 31 Mar 1998 00:00
Date: Tue, 31 Mar 1998 00:00
14 lines
974 bytes
974 bytes
Takashi Asanuma wrote: > htmlファイルの中にある、ハイパーリンクや画像などのファイル名だけを > 変更するスクリプトが急遽必要になり、非常に困っています。 一例です。 perl -pi.sav -e 's!/foo/bar\.gif!/baz/bar\.gif!g' *.html カレントディレクトリの *.html のファイル中の /foo/bar.gif という文字列を /baz/bar.gif に置換します。 また、置換前のファイルは *.html.sav という名称で保存されます。 mw
Technical Details
Message-ID:
<3520CB1F.751F245F@tko.dec.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6fobub$sig@news.doshisha.ac.jp>Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS X-Google-Thread: 1043e7,37198ca4d9ec8a00 X-Google-Attributes: gid1043e7,public From: Maki Watanabe <watanabe.maki@tko.dec.com> Subject: Re: Change Filenames in the HTML Date: 1998/03/31 Message-ID: <3520CB1F.751F245F@tko.dec.com> X-Deja-AN: 339435863 Content-Transfer-Encoding: 7bit References: <6fobub$sig@news.doshisha.ac.jp> Content-Type: text/plain; charset=iso-2022-jp Organization: Digital Equipment Corporation Japan Mime-Version: 1.0 Newsgroups: fj.lang.perl