How to replace the word “Gun” with “Pen” in the first 100 lines of a file?

sed ‘1,00 s/Gun/Pen/’ < filename

Related Questions

Category: UNIX Interview Questions.