1. Introduction Sed is a stream editor that processes content one line at a time. It can perform lot’s of operations over a file like…