linux - 如何使用引号和回车符 grep 长 html 字符串
问题描述
我需要递归查找包含以下 HTML 的所有文件:
<html id="blx-5fb3c619e82a2863d6567c52-000000001" class="blx-5fb3c619e82a2863d6567c52">
<head>
<meta charset="utf-8">
<meta name="google" value="notranslate">
我正在尝试以下但没有成功:
grep --include=\*.html -FRnw "/path-to-dir" -e '<html id="blx-5fb3c619e82a2863d6567c52-000000001" class="blx-5fb3c619e82a2863d6567c52">\n <head>\n <meta charset="utf-8">\n <meta name="google" value="notranslate">'
我究竟做错了什么 ?
解决方案
使用 GNU grep。删除和添加。-F
_-n
"/path-to-dir"
-Poz
推荐阅读
- c# - 从浏览器捕获帧
- oauth-2.0 - Gmail API google.auth.exceptions.RefreshError 范围无效
- here-api - HERE API - 如何根据 GPS 坐标提取有关道路的所有信息
- html - 如何在 Django 中保存 POST 数据?
- php - PhpMailer 附件与 Verot class.upload.php 调整大小
- javascript - 如何在d3中的每个破折号上创建一条带箭头的虚线?
- javascript - 拖放角js后克隆一个元素
- macos - 我无法在 Mac OS Catalina (Haskell) 中安装库光泽
- python - 我正在尝试编写一个简单的代码来计算税收并在您购物时保持运行总额
- tensorflow - 如何通过对象检测在谷歌云视觉上训练边缘 tpu?