码迷,mamicode.com
首页 > 系统相关 > 详细

[PowerShell]Quote in String

时间:2015-11-04 11:14:40      阅读:176      评论:0      收藏:0      [点我收藏+]

标签:

今天遇到一个问题,如何在Select-String的Pattern参数里能使用双引号

比如 Select-String -path . -pattern "Lines: <span class="metric">100% <small>" 是不能工作的

 

查看了文档https://technet.microsoft.com/en-us/library/hh847740.aspx 得到的结论是使用backtick charater(`)

Select-String -path . -pattern "Lines: <span class=`"metric`">100% <small>"

 

[PowerShell]Quote in String

标签:

原文地址:http://www.cnblogs.com/buhaiqing/p/4935285.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!