Article View: news.admin.peering
Article #546Re: Need Utility to..
From: Klaus Alexander Seistrup
Date: Sun, 07 Aug 2011 14:46
Date: Sun, 07 Aug 2011 14:46
35 lines
2514 bytes
2514 bytes
bobo@m.com wrote:
> I need a utility to compare arround 10+ Active.dat
> or a program that can compare 10 + text files
>
> to get only line that are all the 10 text files
If you have access to a un*x box (or a cygwin environment) you could
do something like
#!/bin/sh
cat "${@}" \
| sort \
| uniq -c \
| while read NUM LINE
do
if [ "${NUM}" = "${#}" ]; then
echo "${LINE}"
fi
done
# eof
The shell script, when called with the names of the relevant files,
will find lines that appear in all files. You will have to change
the script if you wish to compare active files, since you only
want to compare the first word on each line (one solution could be
to insert “| awk '{ print $1 }' \” between cat and sort).
Cheers,
--
Klaus Alexander Seistrup | Bitcoin tip jar
gopher://port70.dk/ | 1KLAUS2XgGoov4RwxbYoBWLvWUaLxcDZ5u
Technical Details
Message-ID:
<slrn-4e3ea329-28ad73d8@klaus.seistrup.dk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.admin.peering.20140428.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!zen.net.uk!dedekind.zen.co.uk!nuzba.szn.dk!news.szn.dk!pnx.dk!not-for-mailReferences:
<jjvs37tm00d571c26hjkk6grpp9fa416ce@4ax.com>Show Full Headers
Complete Article Headers
Message-ID: <slrn-4e3ea329-28ad73d8@klaus.seistrup.dk>
Subject: Re: Need Utility to..
Date: Sun, 07 Aug 2011 14:46:34 +0000
From: Klaus Alexander Seistrup <klaus@seistrup.dk>
References: <jjvs37tm00d571c26hjkk6grpp9fa416ce@4ax.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.admin.peering.20140428.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!zen.net.uk!dedekind.zen.co.uk!nuzba.szn.dk!news.szn.dk!pnx.dk!not-for-mail
Newsgroups: news.admin.peering
Organization: SubZeroNet, Copenhagen, Denmark
Lines: 35
Reply-To: klaus@seistrup.dk (Klaus Alexander Seistrup)
NNTP-Posting-Host: edb1.szn.dk
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: zdani.szn.dk 1312728394 5481 fdf9:19c1:2824::edb1 (7 Aug 2011
X-Complaints-To: usenet@szn.dk
NNTP-Posting-Date: Sun, 7 Aug 2011 14:46:34 +0000 (UTC)
Mail-Copies-To: nobody
X-Autolysis: Raro sicut homo nascitur!
X-Face: %3as]HIy6vmP<o\x{\?; N4&*LaTx{K$lXba_w=~$)Ig'cUSjv*4uZTh_dg%^Fl_py+4>+
nG `h+_Om-98Ri4Q-3(df2-zI; g;
nDY\VO|,eA"A__Yc:[E!-w_N,"g1{1`0&I:p4dz!llI$usw6`
}h9t l4d_V0*X@$e|pkajs?GI.bi^fo`z$)wY?Ltx>PU]-F#=U+m9&l0<Zt[a19a4k`Pi|juN\^, T
}JMWHa 0[Kz9eE{3v1JgG=fH_]
User-Agent: slrn/pre1.0.0-18 (Linux)
Cancel-Lock: sha1:67eohlmI5Aj3Pi7ebE/dm74wC7I=
X-Original-Bytes: 2192