From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@uni-duisburg.de (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.help Subject: Re: Software/HD ecology Date: Wed, 18 Dec 2002 09:51:32 +0100 Organization: University of Dortmund, Germany Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <84y96n1zhn.fsf@lucy.cs.uni-dortmund.de> References: <041220020952400758%ajanta@no.spam> <5ld6obj8il.fsf@rum.cs.yale.edu><101220021125583826%ajanta@no.spam> <111220021253524057%ajanta@no.spam> <5l65u0i8zj.fsf@rum.cs.yale.edu> <111220022053507599%ajanta@no.spam> <84k7ifo3s2.fsf@lucy.cs.uni-dortmund.de> <121220021324043990%ajanta@no.spam> <121220021419243187%anil@null.invalid> <161220021454522181%ajanta@no.spam> <84pts1nfs5.fsf@lucy.cs.uni-dortmund.de> <171220021036551390%ajanta@no.spam> <843cowcyxs.fsf@lucy.cs.uni-dortmund.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1040226276 22966 80.91.224.249 (18 Dec 2002 15:44:36 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 18 Dec 2002 15:44:36 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18OgN8-0005xx-00 for ; Wed, 18 Dec 2002 16:44:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18OgKA-0005LP-0A for gnu-help-gnu-emacs@m.gmane.org; Wed, 18 Dec 2002 10:41:30 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!lucy.is.informatik.uni-duisburg.DE!not-for-mail Original-Newsgroups: comp.sys.mac.apps,comp.sys.mac.advocacy,comp.text.tex,gnu.emacs.help Original-Lines: 69 Original-NNTP-Posting-Host: lucy.is.informatik.uni-duisburg.de (134.91.35.216) Original-X-Trace: fu-berlin.de 1040225879 1678857 134.91.35.216 (16 [73968]) User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2.93 (i686-pc-linux-gnu) Cancel-Lock: sha1:04hvNpk0myp7QZe0iz/GRQXzlnc= Original-Xref: shelby.stanford.edu comp.sys.mac.apps:349207 gnu.emacs.help:108259 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:4787 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4787 Jonathon Isaac Swiderski writes: > On Tue, 17 Dec 2002, Kai Großjohann wrote: > >> Alas, the Unix crowd appears to follow the Perl >> philosophy `There is more than one way to do it', and hence, different >> Unices have different ways. > > You've your history backwards--- UNIX predates Perl by better than ten > years. Sorry, I didn't mean to imply any causality. Maybe I should have said that both follow the same philosophy. Got to be careful with my phrasing. I know that Unix is older than Perl :-) > Much of the duplication of functionality in UNIX comes from the > SysV/Berkeley split. Hm. Can't really say much about it. But it seems to me that there is more to it than that. Consider the output of "netstat -ntl" on my GNU/Linux system: /---- | kai@lucy> netstat -ntl | Active Internet connections (only servers) | Proto Recv-Q Send-Q Local Address Foreign Address State | tcp 0 0 0.0.0.0:992 0.0.0.0:* LISTEN | tcp 0 0 0.0.0.0:867 0.0.0.0:* LISTEN | tcp 0 0 0.0.0.0:37 0.0.0.0:* LISTEN | tcp 0 0 0.0.0.0:999 0.0.0.0:* LISTEN | tcp 0 0 0.0.0.0:9 0.0.0.0:* LISTEN | tcp 0 0 172.16.117.1:139 0.0.0.0:* LISTEN | tcp 0 0 0.0.0.0:13 0.0.0.0:* LISTEN | tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN | tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN | tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN | tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN \---- Suppose I wanted to know the list of local addresses listened to. If you ask Peter, he'll say netstat -ntl | awk '$1 == "tcp" { print $4 }' If you ask Paul, he'll say netstat -ntl | tail +3 | tr -s ' ' | cut -d' ' -f4 If you ask Larry, he'll say something involving Perl, and I'm sure there are many other possibilities. If you ask my old friend Michael, who's a lex fan, he'd write a lexer for this, I'm sure. Then there is netstat -ntl | ( \ read a; read a while read prot recv send loc for state; do echo $loc done ) which I haven't tested, but something like this probably works, as well. I think this is not really a BSD versus SysV issue. It's just that Unix provides many tools which can be combined in various ways. -- ~/.signature is: umop ap!sdn (Frank Nobis)