Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Oct 2001 04:13:14 +0200
From:      "Philip Paeps" <philip@paeps.cx>
To:        "'Scott Gerhardt'" <scott@gerhardt-it.com>, "'FreeBSD'" <freebsd-questions@FreeBSD.ORG>
Subject:   RE: "nl" command
Message-ID:  <01be01c1551e$f28fe160$0200000a@paeps.cx>
In-Reply-To: <KPEMLBLEMPMHGLJOCDEGCEABCKAA.scott@gerhardt-it.com>

next in thread | previous in thread | raw e-mail | index | archive | help

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> I'm new to FreeBSD but not new to Linux/UNIX so bear with me.
> I tried using "nl" to number lines in standard out put and I got this:
>
> 102 scott@blue: /home/scott > ls -al | ln
> usage: ln [-fhinsv] file1 file2
>        ln [-fhinsv] file ... directory
>        link file1 file2

You're piping to 'ln' here ... ln is used for linking files.

> My question is: what is the "nl" command under FreeBSD used
> for? I guess
> "cat -n" would give the results I'm looking for but what happend to nl
> (number lines)?

# -- snip man page -- #

To count the number of lines, try wc(1) instead.

This will count the number of lines in the output of ls -al:

% /home/scott > ls -al | wc -l

 - Philip

- --
Philip Paeps
philip@paeps.cx
http://www.vitaya.tv


-----BEGIN PGP SIGNATURE-----
Version: PGP 7.0.1

iQA/AwUBO8pGOr9L0OYEnbh5EQKQ5wCg7sFnyX55Xo0KPSL+7yaxK8OYFeoAnRSh
+Xq59nthrpjNZf5DM157rjSo
=FT1s
-----END PGP SIGNATURE-----



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?01be01c1551e$f28fe160$0200000a>