考虑下面的命令:
elinks -dump file.html
它将打印文件,格式为纯文本(没有HTML标签)。
file.html不断更新(一个新的数据被追加),我想通过“tail -f像这样运行它:
tail -f file.html | elinks -dump
然而它不工作。 有任何想法吗?
tail -n +1 -f file.html | while read line; do elinks -dump $line; done;
试试这个。