MoshiachNow
IS-IT--Management
HI,
In josts file I have :
# 128.100.0.1 token0sample # token ring name/address
# 10.2.0.2 x25sample # x.25 name/address
127.0.0.1 loopback localhost # loopback (lo0) name/address
10.4.30.161 levwtiger
10.4.31.253 timna5 lev
I want use sed to :
1.Remove all lines after 127.0.0.1 one.
2.Add new line with hostname+IP.
Thanks
Long live king Moshiach !
In josts file I have :
# 128.100.0.1 token0sample # token ring name/address
# 10.2.0.2 x25sample # x.25 name/address
127.0.0.1 loopback localhost # loopback (lo0) name/address
10.4.30.161 levwtiger
10.4.31.253 timna5 lev
I want use sed to :
1.Remove all lines after 127.0.0.1 one.
2.Add new line with hostname+IP.
Thanks
Long live king Moshiach !