我有一个vishal.html
文件,文件的内容是:
<html>
<body>
<h1>This is a cool idea</.h1>
</body>
</html>
我想使用 cat 命令读取内容,但是当我尝试cat vishal.html
输出时是:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1671.6">
<style type="text/css">
p.p1 {
margin: 0.0px 0.0px 0.0px 0.0px;
line-height: 14.0px;
font: 12.0px Helvetica;
color: #000000;
-webkit-text-stroke: #000000
}
span.s1 {
font-kerning: none
}
</style>
</head>
<body>
<p class="p1"><span class="s1"><html></span></p>
<p class="p1"><span class="s1"><body></span></p>
<p class="p1"><span class="s1"><h1>This is a cool
idea</.h1></span></p>
<p class="p1"><span class="s1"></body></span></p>
<p class="p1"><span class="s1"></html></span></p>
<p class="p1"><span class="s1"><br> </span></p>
</body>
</html>
但预期的输出是:
<html>
<body>
<h1>This is a cool idea</.h1>
</body>
</html>
在 Mac OS 上也是同样的效果,但不确定为什么 centos 会出现这个问题或者我遗漏了什么东西?