perl -pi -e 's/apple/orange/gi' [download]
Caveat: i without an extention does not work in Windows.
In reply to Re^3: String substitution by ikegami in thread String substitution by kirk123