标签: linux unix sed
我需要使用sed来替换以og结尾的3个字母单词,并使用单词frog。我认为这样可行:
sed 's/?og/frog/' filename
但它没有?
答案 0 :(得分:2)
这可能适合你。
sed 's/\<.og\>/frog/g' filename . matches one character \< beginning of word anchor \> end of word anchor