> > You can generally replace 'wc -l' with sed -n '$=', although you won't
get a
> > zero output if there are no lines.
>
> I know about this construct, using two (2) sed's:
>
> sed -n = | sed -n '$p'
>
> On Dachstein-CD:
>
> sed -n '$='
>
> returns:
>
> sed: -e expression #1, char 1: Unknown command: ``?''
>
> What do you think?

Hmm...works for me:

krypton.private.network: -root-
# sed -n '$=' /etc/network.conf
767

krypton.private.network: -root-
#

The sed man page from debian lists = as a "Zero- or One- address command",
and $ is a valid single address...

Charles Steinkuehler
http://lrp.steinkuehler.net
http://c0wz.steinkuehler.net (lrp.c0wz.com mirror)



_______________________________________________
Leaf-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user

Reply via email to