对于grep特定的关键字和它的内容,我有一个问题。这是示例文件,实际文件比这个文件大。示例abcrandomtextdef another random text blablabla期望的输出将是这样的。iwantthis url=https://www.google.com这些都是我试图得到的输出,但正如你所看到的,它并没有真正起作用。u
假设我在文本文件中有如下(cat cmdlist.txt)命令列表:-lshwawk现在,我想分别通过whatis cut、whatis lshw等获取有关该命令的简单信息,并将这些输出的whatis <commadnd>打印到文本文件中,比如cmdinfo.txt。期望输出的cmdinfo.txt (cat cmdinfo.txt):-
cut (1) - remove sections from each line of fi