Article View: alt.privacy.anon-server
Article #299963Re: allpingers.txt check script
From: elvis-85650
Date: Fri, 14 Sep 2018 09:30
Date: Fri, 14 Sep 2018 09:30
25 lines
2099 bytes
2099 bytes
1 > #!/bin/bash
2 > #
3 > # This script checks the allpingers.txt file to see if it has
4 > # data therein. mixloc should point to the folder that contains
5 > # the allpingers.txt file, usually the same place where mixmaster
6 > # is located.
7 >
8 > filePath=${0%/*}
Only used in relation to AllpingersChkData.txt - could have set whole filename in one step.
13 > cat /dev/null > $filePath/AllpingersChkData.txt
same thing by "> $filePath/AllpingersChkData.txt"
16 > if [[ $(cat $mixloc/allpingers.txt | wc -l) -gt 10 ]]; then # check if allpingers.txt has more than 10 records
[[ $(wc -l < $mixloc/allpingers.txt) -gt 10 ]]
21 > if [[ $(cat $mixloc/allpingers.txt | wc -l) -lt 10 ]] && /
test almost repeated from line 16 although you would have exited if -gt 10 and it didn't save the coount
22 > [[ $(grep -c "ERROR" $filePath/AllpingersChkData.txt) -eq 0 ]]; then # has error email already been sent?
No quotes needed on ERROR.
24 > mutt -s "$mixloc/allpingers.txt empty!" $emailaddr < $mixloc/allpingers.txt
Is mutt safe with unknown input? See "kind Mr. Icarus Sparry" in:
https://www.usenix.org/legacy/publications/library/proceedings/sec96/full_papers/venema/venema.txt
Technical Details
Message-ID:
<slrnppmvsq.ddn.elvis-85650@notatla.org.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!news.usenet.farm!..!..!not-for-mailReferences:
<8ef395802aecda005377703b7480f359@msgid.frell.theremailer.net>Show Full Headers
Complete Article Headers
Message-ID: <slrnppmvsq.ddn.elvis-85650@notatla.org.uk> Subject: Re: allpingers.txt check script Date: Fri, 14 Sep 2018 09:30:02 GMT From: elvis-85650@notatla.org.uk References: <8ef395802aecda005377703b7480f359@msgid.frell.theremailer.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!news.usenet.farm!..!..!not-for-mail Newsgroups: alt.privacy.anon-server X-noarchive: yes X-no-archive: yes User-Agent: slrn/1.0.3 (Linux) Lines: 25 X-Complaints-To: abuse@blocknews.net NNTP-Posting-Date: Fri, 14 Sep 2018 09:30:02 UTC Organization: blocknews - www.blocknews.net X-Received-Bytes: 1965 X-Received-Body-CRC: 499315325 X-Original-Bytes: 1783