【问题标题】:Removing character in list of strings linux [duplicate]删除字符串列表中的字符linux [重复]
【发布时间】:2019-02-16 01:40:53
【问题描述】:

删除字符串列表中的字符 如果我有一个字符串列表,例如:(新行中的每个 url)

"https://www.test.com/test.html"
"https://www.a.com/y.html"
"https://www.sdf.com/zs.html"
"https://www.csc.com/xxxx.com/"

我应该怎么做才能得到这个输出?

www.test.com
www.a.com
www.sdf.com
www.csc.com

【问题讨论】:

标签: bash awk sed


【解决方案1】:

带切:

cut -d'/' -f3 infile

【讨论】:

    猜你喜欢
    • 2014-08-02
    • 2014-09-16
    • 1970-01-01
    • 2011-12-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-13
    • 2013-11-12
    相关资源
    最近更新 更多