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.
我有一个字符串:
abc = "2342"
或:任何字符串=“任何数字”
我想要一个返回值 2342 (或任何数字)
我该怎么做(最好使用 SED)
sed 's/^[^=]*= *"\([^"]*\)"$/\1/'
或者
sed -E 's/^[^=]*= *"([^"]*)"$/\1/'
假设: