linux中提取文本中指定的字符串
linux下,有如下文件内容:
dpkg:警告:files list file for package 'libclutter-1.0-0:i386' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'libtext-wrapi18n-perl' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'slurm' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'libfftw3-3:i386' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'libbindex-java' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'libnotify-bin' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'python-urllib3' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'libbonoboui2-0:i386' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'mysql-client-core-5.5' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'libslf4j-java' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'libaspectj-java' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'deja-dup-backend-gvfs' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'tcpd' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'libavutil-extra-51:i386' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'python-pkg-resources' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'libgtkspell0' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'libafpclient0:i386' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'ubuntu-release-upgrader-gtk' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'libdb-je-java' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'libexempi3:i386' missing; assuming package has no files currently installed dpkg:警告:files list file for package 'xserver-xorg-input-vmmouse' missing; assuming package has no files currently installed
怎么把单引号内的内容提取出来,输出到新的文件中呢?因为要用到单引号中的那些软件名。在下不知道怎么用合适的正则表达式
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
楼主你是打算正则匹配列出这些软件名然后重装解决dpkg配置错误么?
我是把匹配的那些软件都卸载了,出错原因不一定一样
你好,我想问一下我安装软件时也是报这个错,这个问题你是如何解决的?
多谢多谢!!