html - 将 html 行拆分为多行
问题描述
我需要一些帮助。我有一些文件就像
<table><tr><td>This is a test</td></tr><td><div align="center"><img src=""><a href="">test</a></td></table>
我正试图将它们分开
<table>
<tr>
<td>This is a test</td>
</tr>
<td>
<div align="center">
<img src="">
<a href="">test</a>
</td>
</table>
你能帮我吗?
谢谢
解决方案
我能够使用 sed 来做到这一点,更具体的是这样
sed -i 's/></>\n</g' file1
推荐阅读
- javascript - JS - NodeJS 箭头运算符和全局变量
- python - 如何使用 Python 将 List 上的下一项复制到剪贴板?
- nginx - 从蜂窝数据的移动应用程序访问 Web api 的问题
- django - 无法使用正确的设置在 Django 中加载静态文件
- php - 如何在 Json 编码中显示 php 结果
- javascript - 如何在前端将缓冲区转换为 pdf
- c++ - 是什么导致了以下聚合初始化问题?
- python - pygame动画更新问题。播放器和子弹轻弹。最后显示更新不起作用
- python - 使用 python 获取处理器类型 for Apple M1 处理器给了我一个 Intel 处理器
- r - 是否可以在 R 中按两个变量分组,然后为一个变量绘制堆叠列,而为另一个变量绘制位置变量?