Issue
host hostname {
hardware ethernet 00:10:E0:dF:e2:Ee;
fixed-address 192.168.*.*;
ddns-hostname name;
}
I have list of ip addresses in one file. How can I highlight those addresses in dhcpd.hosts file and still to see the whole block or the whole text? emphasized text I've tried to use while read variable; do grep $variable dhcpd.hosts; done < iplistfile
but it's printing only one line
Solution
You probably want
grep --color=always -f iplistfile dhcpd.hosts
and you might want to add the -F
and -w
options too.
Answered By - glenn jackman Answer Checked By - Willingham (WPSolving Volunteer)