如何在单引号内检索URL? [英] How do I sed to retrieve URLs within single quotes?
本文介绍了如何在单引号内检索URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在单引号内检索网址?
目前,它只能检索以HTTP / HTTPS开头的网址。
urls = $(sed -ne's /.* \(http [^] * \)。* / \1 / p's /.* \ (https [^] * \)。* / \1 / p'/ url / to / path)
解决方案
(sed -ne's / 。* \(http [^] * \)。* / \1 / p's /.* \(https [^] * \)。* / \1 / p'/ URL /到/路径)
How do I sed to retrieve URLs within single quotes?
Currently, it can only retrieve URLs which starts with HTTP/HTTPS.
urls=$(sed -ne 's/.*\(http[^"]*\).*/\1/p' 's/.*\(https[^"]*\).*/\1/p' /url/to/path)
解决方案
(sed -ne 's/.*\(http[^"]*\).*/\1/p' 's/.*\(https[^"]*\).*/\1/p' /url/to/path)
这篇关于如何在单引号内检索URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文