Write a command to replace the word “apple” with “(apple)” in a file?

sed s/apple/(&)/ < filename

Category: UNIX Interview Questions.