I have file like below
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
10.120.6.19 slatbnrduva00.ad.admin slatbnrduva00
#172.25.17.75 infrbaddc01.ad.lab
Where "slatbnrduva00" is my hostname. Now i am trying to delete that line using sed as below
sed -i '/`hostname`/d' myhost
but it is not deleting that line. Please let me know how to use built in linux command in sed