Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个字符串:
(string1) "String2_With_More_Parts"
并需要从我的变量中删除 (string1) 。
您可以使用 sed:
echo '(string1) "String2_With_More_Parts"' | sed -e s/\(string1\)\ //
这给出了输出:
"String2_With_More_Parts"