From owner-freebsd-questions Sun Oct 28 23:59:45 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mip.co.za (puck.mip.co.za [209.212.106.44]) by hub.freebsd.org (Postfix) with ESMTP id 4A41337B401 for ; Sun, 28 Oct 2001 23:59:36 -0800 (PST) Received: from patrick (patrick.mip.co.za [10.3.13.181]) by mip.co.za (8.9.3/8.9.3) with SMTP id JAA47970; Mon, 29 Oct 2001 09:59:43 +0200 (SAST) (envelope-from patrick@mip.co.za) From: "Patrick O'Reilly" To: "Gavin Mutch" , Subject: Date: Mon, 29 Oct 2001 10:03:40 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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