84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
在Linux上执行:echo 'aaaaaa' > test.htm然后在浏览器查看test.htm源码,会有一行空行;
echo 'aaaaaa' > test.htm
用vim查看只有一行;
将此文件下载下来用SublimeText查看有两行;
如何在Linux上生成一行的文件?什么原因造成的?
闭关修行中......
echo -n aaaaaa > test.htm
Vim will hide a newline at the end of the file by default. You can use xxd to see the last one0a
0a
//对比下md5值 $ echo -n 123456|md5sum |cut -b-32 e10adc3949ba59abbe56e057f20f883e $ echo 123456|md5sum |cut -b-32 f447b20a7fcbf53a5d5be013ea0b15af $ echo 123456 | hd #可以看到末尾多了`0a`字符 >>> md5(123456) => "e10adc3949ba59abbe56e057f20f883e"
Vim will hide a newline at the end of the file by default. You can use xxd to see the last one
0a