[WBEL-users] grep help

William Hooper whooperhsd2@earthlink.net
Mon, 13 Dec 2004 16:37:11 -0500 (EST)


Timothy Nash said:
[snip]
>ie I only want the first line
> returned.
>
> I thought the following would work:
>
>
> grep 'hostname$' hosts

Works for me without the quoting.

[whooper@token whooper]$ cat test
10.1.1.2   hostname
10.1.1.3   hostname.old
10.1.1.4   hostname.mgt
10.1.1.5   hostname.
[whooper@token whooper]$ grep hostname$ test
10.1.1.2   hostname
[whooper@token whooper]$


-- 
William Hooper