I castrated the following sed syntax in order to remove from file any host that not contain linux/LINUX
sed -i '/linux\|LINUX/!d' file
example
linux01.moon.com
solaris.moon.com
UNIX.foot.com
it will give
linux01.moon.com
but now we have other scenario that domains also include linux name as
linux01.room_linux.com
linux02.gt.com
linux03.klist.com
sol.linux.com
it will give
linux01.room_linux.com
linux02.gt.com
linux03.klist.com
sol.linux.com
instead of
linux01.room_linux.com
linux02.gt.com
linux03.klist.com
so how to change my sed syntax in order to ignore the domain name if include linux or LINUX ?
linuxin the name as soon as they also havelinuxin the domain? Sure?linux01.room_linux.com? It haslinuxin the host name.