阅读背景:

如何将文件名作为字符串提供给grep,以便搜索文件中的模式?

来源:互联网 
ls local* | tail -1

gives a file name for example localhost.txt. I want grep to search for pattern inside this file and not in the filename string. The following doesnt work since it looks for pattern in the filename string rather than inside the file. gives a file name for ex




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: