Date: Mon, 29 Oct 2001 10:03:40 +0200 From: "Patrick O'Reilly" <patrick@mip.co.za> To: "Gavin Mutch" <gmutch@global.co.za>, <questions@FreeBSD.ORG> Message-ID: <NDBBIMKICMDGDMNOOCAIKEIADMAA.patrick@mip.co.za>
next in thread | raw e-mail | index | archive | help
Gavin,
1) please don't use HTML emails.
2) please put a meaningful subject line on your emails.
>Hi
>
>I was wondering if you could tell me if there is a way to get the number of
lines of a piece of text, with no other output. What I mean by >this is
that if you use cat -n file1, you get the number of lines but you also get
the text.
>Thanx
>Gavin
wc is your friend. man wc for more info.
for the number of lines ONLY:
# wc -l /etc/passwd | awk '{print $1}'
Patrick.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NDBBIMKICMDGDMNOOCAIKEIADMAA.patrick>
