Rya*_*yan 2 regex string bash shell text-manipulation
我有一个大型日志文件,我需要从中提取文件名.
该文件如下所示:
/path/to/loremIpsumDolor.sit /more/text/here/notAlways/theSame/here
/path/to/anotherFile.ext /more/text/here/differentText/here
.... about 10 million times
Run Code Online (Sandbox Code Playgroud)
我需要提取这样的文件名:
loremIpsumDolor.sit
anotherFile.ext
Run Code Online (Sandbox Code Playgroud)
我认为我的第一个策略是/path/to/用'' 找到/替换所有.但我坚持如何删除空格后的所有字符.
你能帮我吗?
| 归档时间: |
|
| 查看次数: |
1492 次 |
| 最近记录: |