我想用 sed 替换一行,但得到了两条相同的行:
$ sed '50s/false/true/p' ./src/com/android/quicksearchbox/SearchableSource.java >SearchableSource.java.1
$ diff SearchableSource.java.1 ./src/com/android/quicksearchbox/SearchableSource.java
50,51c50
< private static final boolean DBG = true;
< private static final boolean DBG = true;
---
> private static final boolean DBG = false;
为什么?怎么做才能得到我想要的?