【发布时间】:2011-09-19 18:07:46
【问题描述】:
我一直试图弄清楚如何在 bash 脚本中使用 grep 来匹配从模式到文件末尾的内容。该文件每次的行数并不总是相同,也不总是[A-Za-z0-9]。我正在尝试从基于平面文件的目录迁移到数据库。
文件摘录:
First, Last: Doe, John
ID: xxxxxxxx
...
Case Notes:
This "person" does not exist!
Please do not add him.
Thanks.
我需要抓取从Case Notes: 到文件末尾的所有内容。由于没有真正的 EOF 字符,我似乎找不到任何帮助。
想法?
【问题讨论】: