フッターにコメントを追加する方法

フッターにコメントを追加する方法

awk私は、bashを使用してファイルを変更する方法を学ぶのが好きですsed。しかし、これが問題を引き起こす可能性があることを知っているので、ログを準備したいと思います。ファイル内部。ファイルの修正後にフッターにログを生成する方法を心配していますが.html、そのプロセスが何なのか、何を呼び出すのか分かりません。私は次のことができるようにしたいです。

line break after the very last line of code
comment tag <!--
each item modifed on a line
end comment tag -->

例:

<html>
<head>
</head>
<body>
<div class="example">This is before script</div>
</body>
<html>

<html>
<head>
</head>
<body>
<!--<div class="example">This is after script</div>-->
</body>
<html>

<!--
Change date 2012-12-20 13:13
Commented out example
-->

ベストアンサー1

非常に粗雑な形のバージョンコントロールを探しているようです。このようなVCSの使用を検討することをお勧めします。git

一度インストールしたら、git必要な作業を行うのはとても簡単です。

git init # Initialise the new repository

# ... change some files ...

git add file1 file2                # Add files to context
git commit -m 'Changed something'  # Commit (think "restore point")

その後、必要に応じてgit logおよびを使用して前のコミットを表示できますgit show

おすすめ記事