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.
我在 Access 文件中有一个字符串,如下所示:
/bin/XXX/bla.XXX.bla
我想使用 sed 将所有出现的 XXX 替换为该字符串中的 YYY。g标志本身不起作用可能是因为刺痛很复杂并且带有“/” 。
任何人都可以帮忙吗?谢谢!
用这个:
sed 's/XXX/YYY/g'
g代表替换所有货币
g
因此,如果您有文件 myfile.txt,请执行以下操作:
sed 's/XXX/YYY/g' myfile.txt > mynewfile.txt