【发布时间】:2023-01-12 06:04:30
【问题描述】:
单词重复且只想从特定单词位置删除的地方
Lets say my path is - /opt/xyz/config/config.xml
Solution I want after using sed is: /opt/xyz/config/
如何获得?
我讨厌使用 {sed 's/config.*//'} >> 这实际上删除了两个配置字 就像它看起来
/opt/xyz/
我尝试过以多种方式使用它
> sed 's/config.*//'
【问题讨论】:
-
echo /opt/xyz/config/config.xml | sed 's/config\.xml//'