home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume36 / jobs / part01 < prev    next >
Encoding:
Text File  |  1993-03-21  |  53.2 KB  |  1,585 lines

  1. Newsgroups: comp.sources.misc
  2. From: jim@nestmoi.rain.com (Jim Chorn)
  3. Subject: v36i020:  jobs - misc.jobs Employment Search toolkit, Part01/02
  4. Message-ID: <csm-v36i020=jobs.140509@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: d35e6289e23cd1d5284799c3b3717a6a
  6. Date: Fri, 19 Mar 1993 20:05:49 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: jim@nestmoi.rain.com (Jim Chorn)
  10. Posting-number: Volume 36, Issue 20
  11. Archive-name: jobs/part01
  12. Environment: news, sh
  13.  
  14. This tool is used to summarize misc.job.* postings for a particular
  15. location and/or type of work. The summary can then be printed on
  16. paper and/or distributed to people that don't have news access but
  17. need the information for employment search purposes.
  18.  
  19. This tool is mainly of interest to employment search support
  20. organizations or persons interested in collecting information for
  21. a particular locality for local distribution. The tool is general
  22. enough to *potentially* be used for other news article searches but
  23. there is no intention,support or testing done other than for the
  24. expressed focus of job/employment searching.
  25.  
  26. The toolkit requires: a news feed for misc.jobs.* and may require
  27. (depending on your site system administration) access to /etc/crontab*
  28. or alternately use of the 'at' command. The toolkit has been tested
  29. on a NeXT system (4.3bsd) but should be functional on other systems
  30. with minor modification (See Readme).
  31.  
  32. Enclosed is a Readme which describes the submission, an installation 
  33. script and the tools. All of which are bourne shell source, example 
  34. ascii data files, ascii informational files, one of which contains a 
  35. sample cron entry.
  36.  
  37. See enclosed Readme for more information.
  38.  
  39. #! /bin/sh
  40. # This is a shell archive.  Remove anything before this line, then feed it
  41. # into a shell via "sh file" or similar.  To overwrite existing files,
  42. # type "sh file -c".
  43. # Contents:  listjobs maintjobs setup.default setup.example
  44. #   setup.newyork
  45. # Wrapped by kent@sparky on Fri Mar 19 13:59:43 1993
  46. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  47. echo If this archive is complete, you will see the following message:
  48. echo '          "shar: End of archive 1 (of 2)."'
  49. if test -f 'listjobs' -a "${1}" != "-c" ; then 
  50.   echo shar: Will not clobber existing file \"'listjobs'\"
  51. else
  52.   echo shar: Extracting \"'listjobs'\" \(19340 characters\)
  53.   sed "s/^X//" >'listjobs' <<'END_OF_FILE'
  54. X#!/bin/sh
  55. XPATH=/bin:/usr/bin:/usr/ucb
  56. Xexport PATH
  57. X# CopyRight 1993 James Chorn All Rights Reserved.
  58. X# This work is wholely owned by James Chorn.
  59. X# Permission is given to use and copy the tools described and included
  60. X# herein with the following proviso:
  61. X# Proviso: You will not litigate against James Chorn for misuse, destruction
  62. X#    of property informational or otherwise, and you give James Chorn
  63. X#    credit for producing these tools by always including this copyright
  64. X#    notice prominently in all copies and distributions.
  65. X# No Warrantee is implied or Expressed and this software is provided 'as is'. 
  66. X# James Chorn will not be held accountable for any problem associated with the
  67. X# use of this software.
  68. X# 
  69. X# Usage: listjobs [setupfile]
  70. X#
  71. X# Use this script as often as the posts are cleared from the spool directory.
  72. X#
  73. X# This script finds all job postings with mention for a particular
  74. X# area set. The script cd's to the news spool directory and searches
  75. X# all of the 'misc.jobs.*' articles which include offered,contract,misc,resume.
  76. X# The words that might be expected in a job post:
  77. X#    Area        = Any word like a City Name or State which might appear
  78. X#    ExtendedArea    = Subject line (only) words such as State Abbrev.'s
  79. X#              ExtendedArea is always a superset of Area.
  80. X#    OtherDisregard    = Any word that might indicate a trusted poster which
  81. X#              is known to produce proper subject lines. Disregard
  82. X#              causes posts which are out of the areas to be dropped
  83. X#              iff we can trust the poster's subject line.
  84. X#    Disregard    = Organizations which are local but for reasons
  85. X#              of duplication of effort want only to be summarized.
  86. X#              (Eg. This print out is circulated to a group of
  87. X#                people that get copies of job descriptions from
  88. X#                a contact which also posts these same descriptions
  89. X#                on the net.)
  90. X#    NeverTrust    = We have noticed inappropriate information for *our*
  91. X#              purposes. Adding a login, site or other reasonably
  92. X#              unique word to NeverTrust will remove these articles
  93. X#              from the report generated.
  94. X#
  95. X# Note: Below the notion of a trusted user is mentioned. A trusted user
  96. X#    becomes trusted by putting one of the area's that we detect into
  97. X#    the subject line. In the case of OtherDisregard's (for example)
  98. X#    this amounts to    depending on the subject line to determine if
  99. X#    the article will be included or not.
  100. X# Other Features:
  101. X#    The Setup information below can be placed into a separate file
  102. X#    and used to create different forms for different groups.
  103. X#    eg. listjobs with no arguments get's the Full listing
  104. X#        listjobs SetupFile uses 'SetupFile' information
  105. X#
  106. X# Also see the setup file 'setup.default' for additional information.
  107. XArea="Portland Hillsboro Beaverton Oregon"
  108. XExtendedArea="${Area} OR"
  109. XOtherDisregard="DRINKING Gorgeous"
  110. XNeverTrust="none"
  111. X#
  112. X# Disregard format is as follows: Pattern Key Symbol [Pattern Key Symbol] [...]
  113. X# Where: Pattern is the same type as OtherDisregard (a search pattern).
  114. X#     Key a word to identify summary information.
  115. X#     Symbol a word which is descriptive of the Pattern.
  116. X#
  117. X# eg. Disregard="MyRecruiter Subject: Bob's YourRecruiter Position Harry_Jones"
  118. X#
  119. XDisregard="none"
  120. X#
  121. X# Usenet news spooler structural information.
  122. X#
  123. XSpooledNewsDir="/usr/spool/news/misc/jobs"
  124. XSpooledNews="/usr/spool/news"            # Always assume news kept here
  125. XPostedGroups="contract/* offered/*"
  126. XExt=""
  127. X
  128. Xtrap "rm -rf /tmp/jobs.$$ /tmp/jobtest$$; echo Caught Signal ; exit 1" \
  129. X    1 2 3 4 5 6 7 8 9 10 12 13 14 15
  130. X#
  131. X# Pre Sys V.4 uses -y to make grep case insensitive
  132. XGREPCASE='-c'        # BSD systems
  133. X#GREPCASE='-y'        # Att SysV.4
  134. X#
  135. X# Get Setup Information from a setup file if one present.
  136. X# Note: We check test this file to ensure we have some confidence it will
  137. X#    function properly.
  138. X#
  139. Xif [ $# = 1 ]; then
  140. X    #
  141. X    # Need to eval Area prior to eval of the entire setup to
  142. X    # ensure ExtendedArea picks up the Area from the file and
  143. X    # not the Default above. Variables don't take effect until
  144. X    # after eval completes.
  145. X    eval `egrep '^Area=' $1 | head -1`    # set $Area from setup file
  146. X    eval `sed -e 's,#.*$,,' $1`        # set & eval are sh built-in's
  147. X    #
  148. X    # Now test the setup file out
  149. X    echo "#!/bin/sh -u" > /tmp/jobtest$$    # -u treat unset var's as errors
  150. X    sed -e 's,#.*$,,' $1 >> /tmp/jobtest$$
  151. X    echo `awk -f= '{if (NF != 2) next; printf "echo $%s; ", $1 }' \
  152. X        /tmp/jobtest$$` >> /tmp/jobtest$$
  153. X    chmod +x /tmp/jobtest$$
  154. X    /tmp/jobtest$$ >/dev/null
  155. X    badfile=$?                 # $? = exit status
  156. X    #
  157. X    # Check for multiple of three patterns
  158. X    # on the Disregard Variable
  159. X    #
  160. X    badvar=0
  161. X    egrep -s "^Disregard=none" /tmp/jobtest$$     # -s silent mode
  162. X    if [ $? = 1 ]; then                # $? = exit status
  163. X        TestDisLine=`egrep '^Disregard' /tmp/jobtest$$ | \
  164. X            awk -f= '{ print $2 }' | sed -e s,\",,g`
  165. X        echo $TestDisLine | \
  166. X            awk '{    if ( NF % 3 != 0 ) \
  167. X                    { exit 1 } \
  168. X                else \
  169. X                    print $0 }' > /dev/null
  170. X        badvar=$?
  171. X    fi
  172. X    #
  173. X    # Check out Errors.
  174. X    #
  175. X    rm -f /tmp/jobtest$$
  176. X    if [ $badvar = 1 ]; then
  177. X        echo "$0: Bad setup file $1"
  178. X        echo "$0: Disregard Variable not modulo three fields"
  179. X    fi
  180. X    if [ $badfile = 1 ]; then
  181. X        echo "$0: Bad setup file $1"
  182. X        echo "$0: Variables may not contain #'s characters"
  183. X        echo "$0: Disregard Fields:"
  184. X        echo $TestDisLine | awk '{ while (i++ < NF) \
  185. X                    printf "\t%d:\t%s\n", i, $i}'
  186. X    fi
  187. X    if [ $badvar = 1 -o $badfile = 1 ]; then 
  188. X        exit 1        # Quit
  189. X    fi
  190. Xfi
  191. X
  192. X#
  193. X# Format of the Output:
  194. X#    A Header to describe where this info is coming from and the date.
  195. X#    Subject lines of properly posted articles that match.
  196. X#    The articles that match.
  197. X#    Subject lines of all 'other' articles that have the Area mentioned
  198. X#        which might include: Local company response address or sales
  199. X#        office list (which may really be information not applicable to
  200. X#        the posting's real objective eg a Portland company looking
  201. X#        for an Field Applications Engineer for the Atlanta Office.
  202. X#    The articles that match.
  203. X#    A short blurp of other useful Local information eg BBS, Contact's etc.
  204. X#
  205. X# Where to work on it and put it...
  206. X#
  207. X
  208. Xmkdir /tmp/jobs.$$
  209. Xjobdir=/tmp/jobs.$$
  210. Xjobs=/usr/local/jobs
  211. X
  212. X#
  213. X# listname format: YearMonthDay but can be any form which is granular to # runs.
  214. X#
  215. Xlistname=`/bin/date | awk '{printf "%s%s%s", $6, $2, $3}'`
  216. Xcd $SpooledNewsDir
  217. X#
  218. X# Check Area's out first, this will include any article with
  219. X# *any* mention of a local target job including positions which
  220. X# are offered by local companies that reside out of the area.
  221. X# We use the ignore case grep option here and *assume* "Area" uses
  222. X# full city names. Note that if an article subject line is affected
  223. X# by case the article will placed in the 'other' possibles group
  224. X# but at least it won't be lost.
  225. X#
  226. Xset ${Area}
  227. Xwhile [ -n "$1" ]
  228. Xdo
  229. X    word=`echo $1 | sed -e 's,\^\[, ,g'`
  230. X    for i in  $PostedGroups
  231. X    do
  232. X        echo -n "$i : "
  233. X        sed -e /Message-ID/d -e /Xref/d -e /Path/d $i | \
  234. X            grep ${GREPCASE} -i "${word}"
  235. X    done >>${jobdir}/Possibles
  236. X    shift
  237. Xdone
  238. Xsort ${jobdir}/Possibles | uniq | grep -v ": 0" | \
  239. X    sed -e 's/: .*$//p' | uniq >${jobdir}/AllAreas
  240. X#
  241. X# Now pare the list down
  242. X#
  243. X# Checking Subject lines for Extended areas, eg State Abbrev in subject.
  244. X# We Don't ignore the case in the subject lines here.
  245. X# Note that this is marginal. If the city/state isn't mentioned in
  246. X# the article then it probably won't help to try to catch it here.
  247. X# However, if some friendly person often posts in CAPS and your pattern
  248. X# is often triggered by it, this will help filter some of it out. This
  249. X# is really meant to be a partial filter. There is a more drastic alternative
  250. X# available if using Extended Areas don't help.
  251. X#
  252. Xset ${ExtendedArea}
  253. Xtouch MatchedSubs
  254. Xwhile [ -n "$1" ]            # -n length of string nonzero?
  255. Xdo
  256. X    word=`echo $1 | sed -e 's,\^\[, ,g'`
  257. X    for i in `cat ${jobdir}/AllAreas`
  258. X    do 
  259. X        echo -n "$i : "
  260. X        grep Subject $i | grep ${GREPCASE} "${word}"
  261. X    done >>${jobdir}/MatchedSubs
  262. X    shift
  263. Xdone
  264. Xsort ${jobdir}/MatchedSubs | grep -v ": 0" | \
  265. X    sed -e 's/: .*$//p' | uniq > ${jobdir}/Local
  266. X#
  267. X# sort out other positions which we know probably aren't what we want
  268. X# namely those added from OtherDisregard. 
  269. X#
  270. Xset ${OtherDisregard}
  271. Xif [ $1 != none ]; then
  272. X    while [ -n "$1" ]
  273. X    do
  274. X        word=`echo $1 | sed -e 's,\^\[, ,g'`
  275. X        for i in `cat ${jobdir}/AllAreas`
  276. X        do 
  277. X            echo -n "$i : " ; grep ${GREPCASE} "${word}" $i
  278. X        done >>${jobdir}/OtherDis
  279. X        shift
  280. X    done
  281. X    #
  282. X    # strip out those with no reference and then reformat the line
  283. X    # removing the count information generated by the grep -c above.
  284. X    if [ -s ${jobdir}/OtherDis ]; then        # -s exists && size > 0
  285. X        sort ${jobdir}/OtherDis | grep -v ": 0" | \
  286. X            sed -e 's/: .*$//p' | uniq > ${jobdir}/NotLocal
  287. X    fi
  288. Xfi
  289. Xtouch ${jobdir}/NotLocal    # Ensure that one exists for later
  290. X#
  291. X# Find duplicates from cross postings.
  292. X# This gets kind of complicated due to the format of the Xref string
  293. X# but without it there would be even more work.
  294. X#
  295. Xset `echo "$PostedGroups" | sed -e 's,/\*,,g'`
  296. Xif [ $# -gt 1 ]; then    # only one dir to look thru so don't bother.
  297. X            # It get's messy below so we will not indent this 'if'
  298. X            # to provide reasonable indentation in this block.
  299. X            # The 'fi' is commented. Note: $# = num of params set
  300. Xtouch ${jobdir}/Duplicates
  301. Xfor i in `cat ${jobdir}/Local`
  302. Xdo
  303. X    #
  304. X    # Get all xref's
  305. X    if grep -s Xref $i ; then
  306. X        grep Xref $i >> ${jobdir}/Duplicates
  307. X    fi
  308. Xdone
  309. X
  310. Xif [ -s ${jobdir}/Duplicates ]; then
  311. X    sort ${jobdir}/Duplicates | uniq > ${jobdir}/tmpDup
  312. X    #
  313. X    # separate all fields into single component lines
  314. X    Head=`echo ${SpooledNewsDir} | sed -e s,${SpooledNews}/,,`
  315. X    rm -f ${jobdir}/Duplicates
  316. X    cat ${jobdir}/tmpDup | \
  317. X        awk '{ for (j = 3; j <= NF; ++j) print $j }' | \
  318. X        sed -e s,:,/, -e 's,\.,/,g' -e s,${Head}.,, \
  319. X        >> ${jobdir}/Duplicates
  320. X    #
  321. X    # Gather all lines that we need to look at into a single file
  322. X    # remember that we may have dup's for postings like offered/333
  323. X    # and misc/2222 but misc isn't needed because we only need offered,
  324. X    # we need offered but it's not really a dup so we find out here.
  325. X    # Cryptic but think about it.
  326. X    rm -f ${jobdir}/tmpDup
  327. X    awkmess='{ for (i = 1; i < NF; ++i) printf "%s/" , $i  ; print "\n" }'
  328. X    Groups=`echo "$PostedGroups" | sed -e 's,/\*,,g'`
  329. X    set `cat ${jobdir}/Duplicates` ""
  330. X    while [ -n "$1" ]         # Checking all potential duplicates
  331. X    do
  332. X        for i in $Groups    # against -> all selected groups
  333. X        do
  334. X            group=`echo $1 | awk -f/ "$awkmess" | \
  335. X                sed -e 's,/$,,' | head -1`  # get's the dir
  336. X            if [ "$group" = "$i" ]; then
  337. X                echo $1 >> ${jobdir}/tmpDup
  338. X            fi
  339. X        done
  340. X        shift;
  341. X    done
  342. X    #
  343. X    # tmpDup now has only duplicates in our PostedGroups but it also
  344. X    # has all potential duplicates as well. These are all consecutive
  345. X    # entries in tmpDup so we can now step thru weed out the real dups.
  346. X    #
  347. X    # Now eliminate all unwanted groups from tmpDup
  348. X    rm -f ${jobdir}/Duplicates
  349. X    if [ -s ${jobdir}/tmpDup ]; then
  350. X        set `cat ${jobdir}/tmpDup` ""
  351. X        while [ -n "$1" -a -n "$2" ]
  352. X        do
  353. X            if cmp -s $1 $2 ; then        # -s is silent mode
  354. X                echo $1 >> ${jobdir}/Duplicates
  355. X            fi
  356. X            shift
  357. X        done
  358. X    fi
  359. X    touch ${jobdir}/Duplicates    # Always ensure one is there.
  360. Xfi
  361. X
  362. Xfi    # Commented 'fi' as described from above. This 'fi' is needed
  363. X    # for the block above.
  364. X#
  365. X# Back to main stream.... Once the duplicates have been determined they
  366. X# need to be eliminated from several places.
  367. X#
  368. X# Eliminate duplicates from cross postings
  369. X#
  370. Xfor i in `cat ${jobdir}/Duplicates`
  371. Xdo
  372. X    sed -e s,$i,, ${jobdir}/Local | sort > ${jobdir}/NoDuplics
  373. X    mv -f ${jobdir}/NoDuplics ${jobdir}/Local
  374. Xdone
  375. Xcat ${jobdir}/Local | sort | uniq >${jobdir}/LocalArea
  376. X#
  377. X# Find all articles in AllAreas (LocalArea inclusive)
  378. X#    which we never want to see.
  379. X#
  380. Xtouch ${jobdir}/NeverTrust        # Ensure that one exists for later
  381. Xset ${NeverTrust}
  382. Xif [ $1 != none ]; then
  383. X    while [ -n "$1" ]
  384. X    do
  385. X        word=`echo $1 | sed -e 's,\^\[, ,g'`
  386. X        for i in `cat ${jobdir}/AllAreas`
  387. X        do                     # -c count of lines only
  388. X            echo -n "$i : " ; grep ${GREPCASE} "${word}" $i    
  389. X        done >>${jobdir}/NotEver
  390. X        shift
  391. X    done
  392. X    #
  393. X    # strip out those with no reference and then reformat the line
  394. X    # removing the count information generated by the grep -c above.
  395. X    if [ -s ${jobdir}/NotEver ]; then
  396. X        sort ${jobdir}/NotEver | grep -v ": 0" | \
  397. X            sed -e 's/: .*$//p' | uniq > ${jobdir}/NeverTrust
  398. X    fi
  399. Xfi
  400. X#
  401. X# Eliminate LocalArea and Duplicates from AllAreas
  402. X#
  403. Xfor i in `cat ${jobdir}/LocalArea ${jobdir}/Duplicates`
  404. Xdo
  405. X    sed -e s,$i,, ${jobdir}/AllAreas > ${jobdir}/NoLNoD
  406. X    mv -f ${jobdir}/NoLNoD ${jobdir}/AllAreas
  407. Xdone
  408. X#
  409. X# Eliminate NonLocal and NeverTrust from AllAreas
  410. X#
  411. Xfor i in `cat ${jobdir}/NotLocal ${jobdir}/NeverTrust`
  412. Xdo
  413. X    sed -e s,$i,, ${jobdir}/AllAreas > ${jobdir}/NoLNoT
  414. X    mv -f ${jobdir}/NoLNoT ${jobdir}/AllAreas        # -f force
  415. Xdone
  416. Xcat ${jobdir}/AllAreas | sort | uniq >${jobdir}/NoLNoT
  417. Xmv -f ${jobdir}/NoLNoT ${jobdir}/AllAreas
  418. X#
  419. X# Find Disregards in LocalArea 
  420. X#
  421. Xtouch ${jobdir}/Disregards
  422. Xset ${Disregard}
  423. Xif [ $1 != none ]; then 
  424. X    while [ -n "$1" ]
  425. X    do
  426. X        word=`echo $1 | sed -e 's,\^\[, ,g'`
  427. X        for i in `cat ${jobdir}/LocalArea`
  428. X        do
  429. X            if grep -s  "${word}" $i ; then
  430. X                echo $i    >> ${jobdir}/Disregards
  431. X                echo $i    >> ${jobdir}/Disregards.$1
  432. X            fi
  433. X        done
  434. X        shift; shift; shift;
  435. X    done
  436. Xfi
  437. X#
  438. X# Eliminate Disregard and NeverTrust from LocalArea 
  439. X#
  440. Xfor i in `cat ${jobdir}/Disregards ${jobdir}/NeverTrust`
  441. Xdo
  442. X    sed -e s,$i,, ${jobdir}/LocalArea > ${jobdir}/LoNoDNoT
  443. X    mv -f ${jobdir}/LoNoDNoT ${jobdir}/LocalArea
  444. Xdone
  445. Xcat ${jobdir}/LocalArea | sort | uniq > ${jobdir}/LoNoDNoT
  446. Xmv -f ${jobdir}/LoNoDNoT ${jobdir}/LocalArea
  447. X#
  448. X# Formating time...
  449. X#
  450. X# Header with subject summary for local stuff...
  451. X#
  452. X(    echo -n "________________________________________"; # 40 per
  453. X    echo    "________________________________________";
  454. X    echo ""; )                    > ${jobdir}/Postings
  455. X echo "Internet Job Postings for `/bin/date`"        >> ${jobdir}/Postings
  456. X(    echo -n "________________________________________";
  457. X    echo    "________________________________________";
  458. X    echo ""; )                    >> ${jobdir}/Postings
  459. X(echo ""; echo "Local Area Offerings Summary:")        >> ${jobdir}/Postings
  460. X#
  461. X# Messages for the rest of the form
  462. XOtherLocalSumMSG="Other Local Company Offerings Summary:"
  463. XOtherSumMSG="Summary of Other Postings which follow:"
  464. XSummaryMSG="Summary of "
  465. XPostMSG="posts"
  466. X# Note that the open bracket in the next line matches near its close
  467. XNotShownMSG="        (Articles are not shown below, contact "
  468. X# Lines with imbedded tabs at the start of each string.
  469. XNoAdditionalsMSG="    No Additional Articles Applicable"
  470. XNoArticlesMSG="    No Articles Applicable"
  471. X
  472. X#
  473. X# Collect the subject lines
  474. X# (echo a tab to indent the subject line as well).
  475. X# Note: wc -w = number of words
  476. Xif [ `cat ${jobdir}/LocalArea | wc -w | awk '{ print $1 }'` = 0 ]; then
  477. X    echo "${NoArticlesMSG}"                >> ${jobdir}/Postings
  478. Xfi
  479. X
  480. Xfor i in `cat ${jobdir}/LocalArea`    # Won't happen if nothing there.
  481. Xdo
  482. X(    echo -n "    "; egrep '^Subject' $i |head -1| sed -e s,Subject.,, )\
  483. X                            >> ${jobdir}/Postings
  484. Xdone
  485. X#
  486. X# Format break.
  487. X(echo -n "________________________________________";
  488. Xecho     "________________________________________";
  489. Xecho     ""; )                        >> ${jobdir}/Postings
  490. X#
  491. X# Add Articles
  492. X# Note: grep -v = print all except those with ...
  493. Xfor i in `cat ${jobdir}/LocalArea`
  494. Xdo
  495. X    (echo "";
  496. X    cat $i | grep -v Message-ID ;
  497. X    echo "";
  498. X    echo -n "________________________________________";
  499. X    echo    "________________________________________";
  500. X    echo ""; )                     >> ${jobdir}/Postings
  501. Xdone
  502. X#
  503. X# Add Header for others...
  504. X#
  505. Xecho " "                        >> ${jobdir}/Postings
  506. X(echo -n "________________________________________";
  507. Xecho     "________________________________________";
  508. Xecho     ""; )                         >> ${jobdir}/Postings
  509. X(echo    "";
  510. Xecho  "${OtherLocalSumMSG}")                >> ${jobdir}/Postings
  511. X#
  512. X# Print out summary's of Disregards
  513. X#
  514. X# This is complicated and needs some minor explanation.
  515. X# If there is Disregard'd posts then check the list '$Disregard'
  516. X# for all occurrences of these posts since we know that at least one exists.
  517. X# When one is found, print a header and the name. The name may contain a
  518. X# backslash due to escaping quotes or other special characters so it is
  519. X# sed'd out. Since sed requires a newline we must awk out the newline
  520. X# to create an 'echo -n' effect. These lines are clearly marked below.
  521. X#
  522. X# Remember $Disregard format is 'Pattern Key Symbolic(person)'
  523. X#
  524. Xif [ `cat ${jobdir}/Disregards | wc -w | awk '{ print $1 }'` != 0 ]; then
  525. X
  526. X    set ${Disregard}
  527. X    if [ $1 != none ]; then
  528. X        while [ -n "$1" ]
  529. X        do
  530. X        if [ -s ${jobdir}/Disregards.$1 ]; then
  531. X            (echo "";
  532. X             echo -n ${SummaryMSG}" ";
  533. X            # next echo acts like echo -n
  534. X            echo  $1 | sed -e 's,\\,,' -e 's,\^\[, ,g' | \
  535. X                awk '{printf "%s", $0 }';
  536. X            # get the summary lines from these users...
  537. X            echo " ${PostMSG}:";
  538. X            word=`echo $2 | sed -e 's,\^\[, ,g'`
  539. X            for i in `cat ${jobdir}/Disregards.$1`
  540. X            do
  541. X                echo -n "        ";    # tabs->' '
  542. X                tr '\011' ' ' < $i | grep "${word} ";
  543. X            done;
  544. X            echo "";
  545. X            (echo -n "${NotShownMSG}";
  546. X            # next echo acts like echo -n
  547. X            echo  $3 | sed -e 's,\\,,' -e 's,\^\[, ,g' | \
  548. X                awk '{printf "%s", $0 }';
  549. X            #
  550. X            echo " )") | fmt )        >> ${jobdir}/Postings
  551. X        fi
  552. X        shift; shift; shift;    # Must match #arg's per entry
  553. X        done
  554. X        echo ""                    >> ${jobdir}/Postings
  555. X        echo "${OtherSumMSG}"            >> ${jobdir}/Postings
  556. X    fi
  557. Xfi
  558. X#
  559. X# Collect the subject lines
  560. X#
  561. Xif [ `cat ${jobdir}/AllAreas | wc -w | awk '{ print $1 }'` = 0 ]; then
  562. X    echo "$NoAdditionalsMSG"            >> ${jobdir}/Postings
  563. Xfi
  564. X
  565. Xfor i in `cat ${jobdir}/AllAreas`
  566. Xdo
  567. X    (echo -n "    "; egrep '^Subject' $i |head -1|sed -e s,Subject.,, ) \
  568. X                            >> ${jobdir}/Postings
  569. Xdone
  570. X#
  571. X(echo -n "________________________________________";
  572. Xecho     "________________________________________";
  573. Xecho     ""; )                         >> ${jobdir}/Postings
  574. X#
  575. X# Add Articles
  576. X#
  577. Xfor i in `cat ${jobdir}/AllAreas`
  578. Xdo
  579. X    ( echo "";
  580. X    cat $i | grep -v Message-ID ;
  581. X    echo "";
  582. X    echo -n "________________________________________";
  583. X    echo     "________________________________________";
  584. X    echo     ""; )                     >> ${jobdir}/Postings
  585. Xdone
  586. X#
  587. X# Add a Default Final Comment.
  588. X#
  589. Xif [ -s ${jobs}/Comments${Ext} ]; then
  590. X    egrep -v "^#" ${jobs}/Comments${Ext}        >> ${jobdir}/Postings
  591. Xelif [ -s ${jobs}/Comments ]; then
  592. X    egrep -v "^#" ${jobs}/Comments            >> ${jobdir}/Postings
  593. Xelse
  594. X   (echo "";
  595. X    echo "This job listing was provided by an automated tool which collect"; 
  596. X    echo "and organizes Usenet Articles from misc.jobs news groups, updated";
  597. X    echo "weekly. Any comments should be directed to jobs@nestmoi.rain.com via e-mail.";
  598. X    echo "";
  599. X    echo "The usual disclaimers apply.... Good Hunting!"
  600. X    echo -n "________________________________________";
  601. X    echo    "________________________________________";) >> ${jobdir}/Postings
  602. Xfi
  603. X#
  604. X# Now save it somewhere usefully accessible
  605. X#
  606. Xegrep -v '^Xref' ${jobdir}/Postings > ${jobs}/${listname}${Ext}
  607. Xecho $listname > ${jobs}/Last
  608. Xrm -rf $jobdir
  609. Xexit 0
  610. X#
  611. X# Inconveniences:
  612. X# 1. This should allow other places like comp.jobs or other's which might
  613. X#    pop up in Internet topology but is not implemented.
  614. X#
  615. X# 1 can be solved by altering the 'cd' line and replicating the script
  616. X# for the other tree's or just use the check arg[0] trick with a link.
  617. X#    I've made provisions in the setup scripts to do some of this but
  618. X#    I don't get ba.jobs or other topologies so I can't test it out. This
  619. X#    might already work.
  620. X#
  621. X# 2. The script is slow, (but who cares, it's a cron job anyway RIGHT?).
  622. X#
  623. X# 3. It would be nice if we only needed to run this script once for each
  624. X#    different setup file but I don't have the time to investigate the
  625. X#    file name conflicts which might exist (let me know if you do).
  626. X#
  627. X# 4. It would be nice to handle line wrapped patterns.
  628. END_OF_FILE
  629.   if test 19340 -ne `wc -c <'listjobs'`; then
  630.     echo shar: \"'listjobs'\" unpacked with wrong size!
  631.   fi
  632.   chmod +x 'listjobs'
  633.   # end of 'listjobs'
  634. fi
  635. if test -f 'maintjobs' -a "${1}" != "-c" ; then 
  636.   echo shar: Will not clobber existing file \"'maintjobs'\"
  637. else
  638.   echo shar: Extracting \"'maintjobs'\" \(17976 characters\)
  639.   sed "s/^X//" >'maintjobs' <<'END_OF_FILE'
  640. X#!/bin/sh 
  641. XPATH=/bin:/usr/bin:/usr/ucb
  642. Xexport PATH
  643. X# CopyRight 1993 James Chorn All Rights Reserved.
  644. X# This work is wholely owned by James Chorn.
  645. X# Permission is given to use and copy the tools described and included
  646. X# herein with the following proviso:
  647. X# Proviso: You will not litigate against James Chorn for misuse, destruction
  648. X#    of property informational or otherwise, and you give James Chorn
  649. X#    credit for producing these tools by always including this copyright
  650. X#    notice prominently in all copies and distributions.
  651. X# No Warrantee is implied or Expressed and this software is provided 'as is'. 
  652. X# James Chorn will not be held accountable for any problem associated with the
  653. X# use of this software.
  654. X# 
  655. X# Usage: maintjobs [name]
  656. X#
  657. X# Use this script when ever you need to create a new setup file or you
  658. X# need to modify an existing setup file.
  659. X#
  660. X# The Variables:
  661. X#    SpooledNewsDir      Where the news lives
  662. X#    PostedGroups      Which news groups to check
  663. X#    Area        = Any word like a City Name or State which might appear
  664. X#    ExtendedArea    = Subject line (only) words such as State Abbrev.'s
  665. X#              ExtendedArea is always a superset of Area.
  666. X#              These also tell us the articles which we trust, namely
  667. X#              that the subject line and/or content is interesting.
  668. X#    OtherDisregard    = Any word that might indicate a trusted poster which
  669. X#              is known to produce proper subject lines. Disregard
  670. X#              causes posts which are out of the areas to be dropped
  671. X#              iff we trust the poster's subject line.
  672. X#    Disregard    = Organizations which are local but for reasons
  673. X#              of duplication of effort want only to be summarized.
  674. X#              (Eg. This print out is circulated to a group of
  675. X#                people that get copies of job descriptions from
  676. X#                a contact which also posts these same descriptions
  677. X#                on the net.)
  678. X#    NeverTrust    = Articles that may contain information we don't
  679. X#              want can be removed using never trust. Typically
  680. X#              a small percentage of articles are posted by
  681. X#              people thinking that the news groups searched are
  682. X#              meant for requests for information instead of 
  683. X#              being meant to provide requests for interested
  684. X#              parties. Sometimes there are mistakes and flames
  685. X#              all of which we don't want to see. NeverTrust
  686. X#              provides a way to remove these once detected.
  687. X#              You can add a usenet address or a word from the
  688. X#              content which uniquely identifies this stream.
  689. X#              You should also be careful to be *very* selective
  690. X#              as there are no checks against the other variables.
  691. X#    Ext        = setup file extension name
  692. X#
  693. X# Also see the setup file 'setup.default' for additional information.
  694. Xjobs=/usr/local/jobs
  695. X
  696. X#
  697. X# List of expected variables in the setup file. If These aren't there they
  698. X# are added. Maintenance note: Variables is order dependent and must be
  699. X# consistent with the notion of the variable order here in this script
  700. X# and the setup file.
  701. XVar1="Area ExtendedArea NeverTrust OtherDisregard SpooledNewsDir"
  702. XVar2="PostedGroups Ext"
  703. XVariables="$Var1 $Var2"
  704. X#
  705. X# Set the default variables
  706. XArea="Portland Hillsboro Beaverton Oregon"
  707. XExtendedArea="${Area} OR"
  708. XOtherDisregard="DRINKING Gorgeous"
  709. XDisregard="none"
  710. XNeverTrust="none"
  711. XSpooledNewsDir="/usr/spool/news/misc/jobs"
  712. XPostedGroups="contract/* offered/*"
  713. XExt=""
  714. X
  715. Xmodmods=/tmp/maintjobsmods.$$        # modifications are placed here
  716. Xmodfile=/tmp/maintjobsfile.$$        # copy of original setup file
  717. Xtestfile=/tmp/maintjobs.$$         # test file to be created
  718. Xmodit=/tmp/maintjobsED.$$        # ed script created to deal with changes
  719. Xtrap "rm -rf $testfile $modfile ${modfile}.tmp $modmods $modit ; exit 1 " \
  720. X    0 1 2 3 4 5 6 7 8 9 10 12 13 14 15
  721. X
  722. X#
  723. X# Help user with navigation
  724. X#
  725. Xnotdone=1
  726. Xif [ $# != 1 ]; then
  727. X    echo "All setup files are in the format 'setup.name'"
  728. X    echo "Where 'name' is the only argument to this program"; echo""
  729. X    echo "The default file is named 'setup.default'."
  730. X    name=default
  731. Xelse
  732. X    name=`echo $1 | sed -e s,setup,, -e 's/\.//'`
  733. Xfi
  734. X
  735. Xwhile [ $notdone = 1 ];
  736. Xdo
  737. X    echo -n "Is it ok to use setup.$name y/[n]? "
  738. X    read ans
  739. X    if [ " $ans" = " y" ]; then
  740. X        notdone=0
  741. X        Name=$name
  742. X    else
  743. X        echo -n "enter name: "
  744. X        read name
  745. X        Name=`echo $name | sed -e s,setup,, -e 's/\.//'`
  746. X        while [ " $name" = " " ];
  747. X        do
  748. X            echo -n "Quit [n]/y? "
  749. X            read ans
  750. X            if [ " $ans" = " y" ]; then exit;
  751. X            else
  752. X                echo -n "enter name: "
  753. X                read name
  754. X            fi
  755. X        done
  756. X    fi
  757. Xdone
  758. X
  759. X#
  760. X# Got a name so, check the name out and deal with it.
  761. X#
  762. Xif [ $Name != default -a -s ${jobs}/setup.$Name ]; then
  763. X    echo -n "$Name exists, ok to modify $Name [y]/n? "
  764. X    read ans
  765. X    if [ " $ans" != " n" ]; then 
  766. X        echo "Modifying ${jobs}/setup.$Name"
  767. X        eval `sed -e 's,#.*$,,' ${jobs}/setup.$Name`
  768. X    else
  769. X        exit
  770. X    fi
  771. Xelif [ $Name = default ]; then
  772. X    if [ -s ${jobs}/setup.default ]; then
  773. X        echo "Modifying ${jobs}/setup.$Name"
  774. X        eval `sed -e 's,#.*$,,' ${jobs}/setup.$Name`
  775. X    else
  776. X        echo "The default setup file is missing"
  777. X        echo "using built-in's..."; echo ""
  778. X    fi
  779. Xelse
  780. X    echo "Creating ${jobs}/setup.$Name"
  781. X    if [ -s ${jobs}/setup.default ]; then
  782. X        # copy the default's file and use it.
  783. X        #
  784. X        cp ${jobs}/setup.default ${jobs}/setup.$Name
  785. X        if [ $? = 1 ]; then
  786. X            echo "Can't create it, check permissions, sorry."
  787. X            exit 1
  788. X        fi
  789. X        eval `sed -e 's,#.*$,,' ${jobs}/setup.$Name`
  790. X    else
  791. X        echo "The default setup file is missing"
  792. X        echo "using built-in's..."; echo ""
  793. X        echo "#" > ${jobs}/setup.$Name
  794. X        if [ $? = 1 ]; then
  795. X            echo "Can't create it, check permissions, sorry."
  796. X            exit 1
  797. X        fi
  798. X        (echo "#"; echo "# job list setup file"; echo "#" ) \
  799. X            >> ${jobs}/setup.$Name
  800. X    fi
  801. Xfi
  802. Xcp ${jobs}/setup.$Name $modfile
  803. X#
  804. X# setup an ESC character to the real thing
  805. XESC=`echo a | tr a '\033'`
  806. X#
  807. X# Loop forever asking for changes and testing the results.
  808. X# We ask to break the loop at selected points.
  809. X#
  810. XMod=""    # Keep track of fields modified
  811. Xnotdone=1
  812. Xwhile [ $notdone = 1 ];
  813. Xdo
  814. X    eval `sed -e 's,#.*$,,' $modfile`
  815. X    #
  816. X    # Make up a tmp ExtendedArea, we separate this up and recombine later
  817. X    # to deal with the imbedded Area variable.
  818. X    set $ExtendedArea
  819. X    for a in $Area
  820. X    do
  821. X        if [ " $1" = " $a" ]; then
  822. X            shift;
  823. X        fi
  824. X    done
  825. X    LOCALE=$*
  826. X    # Ensure a 'none' field always in these.
  827. X    if [ "${Area} " = " " ]; then
  828. X        Area="none" ; fi
  829. X    if [ "${LOCALE} " = " " ]; then
  830. X        LOCALE="none" ; fi
  831. X    if [ "${NeverTrust} " = " " ]; then
  832. X        NeverTrust="none" ; fi
  833. X    if [ "${OtherDisregard} " = " " ]; then
  834. X        OtherDisregard="none" ; fi
  835. X    if [ "${Disregard} " = " " ]; then
  836. X        Disregard="none" ; fi
  837. X    if [ "${SpooledNewsDir} " = " " ]; then
  838. X        Area="/usr/spool/news" ; fi
  839. X    if [ "${PostedGroups} " = " " ]; then
  840. X        PostedGroups='*' ; fi
  841. X    #
  842. X    # Ask for changes
  843. X    #
  844. X    echo "---------------------------------"
  845. X    echo "Areas:         ${Area}"
  846. X    echo "ExtendedArea:     ${LOCALE}"
  847. X    echo "NeverSee:    ${NeverTrust}"
  848. X    echo "OtherDisregard: ${OtherDisregard}"
  849. X    echo "Disregard:     ${Disregard}"
  850. X    echo "SpooledNewsDir: ${SpooledNewsDir}"
  851. X    echo "PostedGroups:     ${PostedGroups}"
  852. X    echo "---------------------------------"
  853. X    echo "Commands: A-Add D-Delete C-Clearall Q-Quit S-Show H-Help"
  854. X    echo "Fields:     A E N O D S P"
  855. X    while [ $notdone = 1 ];
  856. X    do
  857. X    #
  858. X    # Get the command
  859. X    #
  860. X        echo -n "Command? " ; read ans;
  861. X        case $ans in
  862. X        A | a ) cmd=add;;
  863. X        C | c ) cmd=clr;;
  864. X        D | d ) cmd=del;;
  865. X        Q | q ) cmd=quit;;
  866. X        S | s ) cmd=tryagain;
  867. X            echo "---------------------------------"
  868. X            echo "Areas:         ${Area}"
  869. X            echo "ExtendedArea:     ${LOCALE}"
  870. X            echo "NeverSee:    ${NeverTrust}"
  871. X            echo "OtherDisregard: ${OtherDisregard}"
  872. X            echo "Disregard:     ${Disregard}"
  873. X            echo "SpooledNewsDir: ${SpooledNewsDir}"
  874. X            echo "PostedGroups:     ${PostedGroups}"
  875. X            echo "---------------------------------"
  876. X            echo -n "Commands: A-Add D-Delete C-Clearall Q-Quit"
  877. X            echo " S-Show H-Help"
  878. X            echo "Fields:     A E N O D S P"
  879. X            ;;
  880. X        H | h ) cmd=tryagain;
  881. X            if [ -s ${jobs}/Help ]; then
  882. X                cat ${jobs}/Help
  883. X            fi
  884. X            ;;
  885. X        *) cmd=tryagain;;
  886. X        esac
  887. X        if [ $cmd = quit ]; then
  888. X            break;
  889. X        elif [ $cmd = tryagain ]; then
  890. X            continue
  891. X        fi
  892. X    #
  893. X    # Get field to apply command
  894. X    #
  895. X        echo -n "Field? " ; read ans;
  896. X        new="";
  897. X        case $ans in
  898. X        A | a) fld=A; set "${Area}";;
  899. X        E | e) fld=E; set "${LOCALE}";;
  900. X        N | n) fld=N; set "${NeverTrust}";;
  901. X        O | o) fld=O; set "${OtherDisregard}";;
  902. X        D | d) fld=D; set "${Disregard}";;
  903. X        S | s) fld=S; set "${SpooledNewsDir}";;
  904. X        P | p) fld=P; set "${PostedGroups}";;
  905. X        *) continue;;
  906. X        esac
  907. X    #
  908. X    # Apply commands, most special cases handle removal of extra
  909. X    #        space characters, special conditions on variables
  910. X    #        and we try to be *real* careful.
  911. X        New=$*
  912. X        idx=$#
  913. X        case $cmd in
  914. X            
  915. X        add )    Mod="${Mod} $fld";
  916. X            if [ $fld = D ]; then        # Remind fields
  917. X                   echo "FYI-> 1:WhoPat 2:SummaryPat 3:Contact_info"
  918. X            fi
  919. X            echo -n "name: "; read ans;
  920. X            tmpans=`echo "${ans}" | sed -e "s,\\\\${ESC},^[,g" `
  921. X            ans=${tmpans}
  922. X            set -
  923. X            if [ "$New" = none ]; then # we are adding to none
  924. X                New=""          # so remove 'none' from list
  925. X            fi
  926. X            if [ "$New" = "*" ]; then
  927. X                New=""             # so remove * from list
  928. X            fi
  929. X            if [ $fld = P ]; then        # add expansion
  930. X                if [ " $ans" != " " ]; then
  931. X                    ans="${ans}/*"    # ignore blanks
  932. X                fi
  933. X            fi
  934. X            new="${New} ${ans}";
  935. X            if [ " $New" = " " ]; then    # ignore blanks
  936. X                new="${ans}";
  937. X            fi
  938. X            New=$new
  939. X            if [ $fld = S ]; then    # Only allow one here
  940. X                New=$ans;
  941. X            fi
  942. X            if [ $fld = E -a "$Area" = none ]; then
  943. X                echo "Add some Area's first, Extended Areas"
  944. X                echo "    is used to qualify additional Subject"
  945. X                echo "    lines and will always include Area"
  946. X                New=""
  947. X            fi
  948. X        ;;
  949. X        del ) set $@    # We ask for each one
  950. X            if [ $fld = S ]; then    # tell em to use add
  951. X                echo "Use Add to change spool directory"
  952. X                continue
  953. X            fi
  954. X            if [ "$New" = none ]; then
  955. X                echo "None to delete"
  956. X                continue
  957. X            fi
  958. X            while [ $idx -gt 0 ]; do
  959. X                tmpqus=`echo "$1"| sed -e 's,\^\[, ,g' `
  960. X                echo -n "Delete '${tmpqus}' y/[n]? "
  961. X                read ans
  962. X                if [ " $ans" != " y" ]; then
  963. X                    if [ " $new" = " " ]; then
  964. X                        new="$1"
  965. X                    else
  966. X                        new="$new $1"
  967. X                    fi
  968. X                fi
  969. X                shift; idx=$#
  970. X            done
  971. X            if [ $fld = P ]; then
  972. X                new='*'
  973. X            fi
  974. X            New=$new
  975. X            Mod="${Mod} $fld";
  976. X        ;;
  977. X        clr ) if [ $fld = S ]; then # tell em to use add
  978. X                echo "Use Add to change spool directory"
  979. X                continue
  980. X            fi
  981. X            New=""
  982. X            #
  983. X            # Ensure a 'none' field always in these.
  984. X            if [ $fld = N -o $fld = O -o $fld = D ];
  985. X            then
  986. X                New="none"
  987. X            elif [ $fld = A -o $fld = E ];
  988. X            then
  989. X                New="none"
  990. X            elif [ $fld = A ]; then # clear Extended area as well
  991. X                LOCALE="none"
  992. X            fi
  993. X            #
  994. X            # set it to all possible subdirectories
  995. X            if [ $fld = P ]; then
  996. X                New='*'
  997. X            fi
  998. X            Mod="${Mod} $fld";
  999. X        ;;
  1000. X        esac
  1001. X        #
  1002. X        # Ensure a 'none' field always in these.
  1003. X        if [ "${New} " = " " ]; then
  1004. X            if [ $fld = N -o $fld = O -o $fld = D ];
  1005. X            then
  1006. X                New="none"
  1007. X            elif [ $fld = A -o $fld = E ];
  1008. X            then
  1009. X                New="none"
  1010. X            elif [ $fld = A ]; then
  1011. X                LOCALE="none"
  1012. X            fi
  1013. X        fi
  1014. X        #
  1015. X        # This is where we actually replace the variables with the tmp.
  1016. X        case $fld in
  1017. X        A ) Area=$New;;
  1018. X        E ) LOCALE=$New;;
  1019. X        #  The sed action below handles "*" and "'" strings in raw form
  1020. X        #  A similar sed line also appears in the 'ed' script for
  1021. X        #  the same reason
  1022. X        N ) NeverTrust=`echo "$New" | \
  1023. X            sed -e "s,',\\\\\',g" -e "s,\\\*,\\\\\*,g"`;;
  1024. X        O ) OtherDisregard=`echo "$New" | \
  1025. X            sed -e "s,',\\\\\',g" -e "s,\\\*,\\\\\*,g"`;;
  1026. X        D ) Disregard=`echo "$New" | \
  1027. X            sed -e "s,',\\\\\',g" -e "s,\\\*,\\\\\*,g"`;;
  1028. X        S ) if [ -d $New ]; then
  1029. X            SpooledNewsDir=$New
  1030. X            else
  1031. X            echo "$New doesn't exist, no change"
  1032. X            fi ;;
  1033. X        P )
  1034. X            if [ "$New" != "*" ]; then
  1035. X            new=""
  1036. X            tdir=`echo $New | sed -e 's,/\*,,g'`
  1037. X            for dir in $tdir
  1038. X            do
  1039. X                if [ -d "${SpooledNewsDir}/${dir}" ]; then
  1040. X                    if [ " $new" = " " ]; then
  1041. X                        new="${dir}/*"
  1042. X                    else
  1043. X                        new="$new ${dir}/*"
  1044. X                    fi
  1045. X                else
  1046. X                    echo "no ${SpooledNewsDir}/$dir, ignored"
  1047. X                fi
  1048. X            done
  1049. X            New=$new
  1050. X            fi
  1051. X            PostedGroups=$New;;
  1052. X        esac
  1053. X    done
  1054. X    ExtendedArea="${Area} ${LOCALE}"    # Always reset this here
  1055. X
  1056. X    #
  1057. X    # Create a file with all modified variables in it.
  1058. X    #
  1059. X    echo "Area=\"${Area}\""             > $modmods
  1060. X    if [ "$LOCALE" = none ]; then
  1061. X        LOCALE=""
  1062. X    fi
  1063. X    echo "ExtendedArea=\"\${Area} ${LOCALE}\""    >> $modmods
  1064. X    if [ "$NeverTrust" = none ]; then
  1065. X        echo "NeverTrust=none"            >> $modmods
  1066. X    else
  1067. X        echo "NeverTrust=\"${NeverTrust}\""    >> $modmods
  1068. X    fi
  1069. X    if [ "$OtherDisregard" = none ]; then
  1070. X        echo "OtherDisregard=none"        >> $modmods
  1071. X    else
  1072. X        echo "OtherDisregard=\"${OtherDisregard}\""    >> $modmods
  1073. X    fi
  1074. X    if [ "$Disregard" = none ]; then
  1075. X        echo "Disregard=none"            >> $modmods
  1076. X    else
  1077. X        echo "Disregard=\"${Disregard}\""    >> $modmods
  1078. X    fi
  1079. X    echo "SpooledNewsDir=\"${SpooledNewsDir}\""    >> $modmods
  1080. X    echo "PostedGroups=\"${PostedGroups}\""        >> $modmods
  1081. X    #
  1082. X    # Special case default...
  1083. X    if [ "$Name" != default ]; then
  1084. X        echo "Ext=\".$Name\""            >> $modmods
  1085. X    else
  1086. X        echo "Ext=\"\""                >> $modmods
  1087. X    fi
  1088. X    #
  1089. X    # Check out the setup file to ensure we are consistent with
  1090. X    # any maintenance on this script. We want to match the number
  1091. X    # number of lines in the modmods file to the variables in the
  1092. X    # actual setup file.
  1093. X    SetupLines=`egrep -v "^#" $modfile | sed -e '/^$/D' | \
  1094. X        wc -l | awk '{print $1}'`
  1095. X    ModLines=`wc -l $modmods | awk '{print $1}'`
  1096. X    if [ $SetupLines != $ModLines ]; then
  1097. X        echo "Missing variables in setup file. Correcting..."
  1098. X        sed -e 's,^,#,' $modfile > ${modfile}.tmp
  1099. X        cat $modmods >> ${modfile}.tmp
  1100. X        mv -f ${modfile}.tmp ${modfile}
  1101. X        echo "Fixed. Corrections are added if you want these changes."
  1102. X        echo "You will be asked."
  1103. X    fi
  1104. X    #
  1105. X    # Remove redundant Mod's in Mod field
  1106. X    if [ " $Mod" != " " ]; then        # No changes made avoid set
  1107. X        set $Mod
  1108. X        Mod=""
  1109. X        while [ $# ]; do
  1110. X            isInList=false
  1111. X            for I in $Mod
  1112. X            do
  1113. X                if [ " $I" = " $1" ]; then 
  1114. X                    isInList=true; break
  1115. X                fi
  1116. X            done
  1117. X            if [ $isInList = false ]; then
  1118. X                Mod="${Mod} $1";
  1119. X            fi
  1120. X            if [ $# != 1 ]; then
  1121. X                shift
  1122. X            else
  1123. X                break;
  1124. X            fi
  1125. X        done
  1126. X    fi
  1127. X    #
  1128. X    # Create an ed script to make the changes.
  1129. X    ( echo '#!/bin/sh'
  1130. X        echo '#'
  1131. X        echo '# This is an ed script.'
  1132. X        echo '#'
  1133. X        echo 'read area'
  1134. X        echo 'read exarea'
  1135. X                    )    > $modit
  1136. X    #
  1137. X    # Urggggg ;-) sed out for special characters...
  1138. X    #
  1139. X    cat >>$modit << @@EDSCRIPT@@
  1140. X        read nevsee
  1141. X        nevsee=\`echo "\$nevsee" |sed -e "s,',\\\\\\\\\',g"\`
  1142. X        nevsee=\`echo "\$nevsee" |sed -e "s,\\\*,\\\\\\\\\*,g"\`
  1143. X@@EDSCRIPT@@
  1144. X    cat >>$modit << @@EDSCRIPT@@
  1145. X        read odist
  1146. X        odist=\`echo "\$odist" |sed -e "s,',\\\\\\\\\',g"\`
  1147. X        odist=\`echo "\$odist" |sed -e "s,\\\*,\\\\\\\\\*,g"\`
  1148. X@@EDSCRIPT@@
  1149. X    cat >>$modit << @@EDSCRIPT@@
  1150. X        read dgard
  1151. X        dgard=\`echo "\$dgard" |sed -e "s,\\\*,\\\\\\\\\*,g"\`
  1152. X        dgard=\`echo "\$dgard" |sed -e "s,',\\\\\\\\\',g"\`
  1153. X@@EDSCRIPT@@
  1154. X        echo read spool         >> $modit
  1155. X        echo read pnews         >> $modit
  1156. X    #
  1157. X    # So much for the preamble.
  1158. X    #
  1159. X    # Some of this next stuff looks bad but...
  1160. X    #
  1161. X    echo 'read ext'             >> $modit
  1162. X    echo "/bin/ed ${modfile}" '  << @EOF@'    >> $modit # Watch the quotes
  1163. X    for mods in $Mod
  1164. X    do
  1165. X        case $mods in
  1166. X        A) echo '$'             >> $modit
  1167. X           echo '/^Area/'        >> $modit
  1168. X           echo 's/^/#/'        >> $modit
  1169. X           echo 'a'            >> $modit
  1170. X           echo '$area'            >> $modit
  1171. X           echo '.'            >> $modit
  1172. X           ;;
  1173. X        E) echo '$'            >> $modit
  1174. X           echo '/^ExtendedArea/'    >> $modit
  1175. X           echo 's/^/#/'        >> $modit
  1176. X           echo 'a'            >> $modit
  1177. X           echo '$exarea'        >> $modit
  1178. X           echo '.'            >> $modit
  1179. X           ;;
  1180. X        N) echo '$'            >> $modit
  1181. X           echo '/^NeverTrust/'        >> $modit
  1182. X           echo 's/^/#/'        >> $modit
  1183. X           echo 'a'            >> $modit
  1184. X           echo '$nevsee'        >> $modit
  1185. X           echo '.'            >> $modit
  1186. X           ;;
  1187. X        O) echo '$'            >> $modit
  1188. X           echo '/^OtherDisregard/'    >> $modit
  1189. X           echo 's/^/#/'        >> $modit
  1190. X           echo 'a'            >> $modit
  1191. X           echo '$odist'        >> $modit
  1192. X           echo '.'            >> $modit
  1193. X           ;;
  1194. X        D) echo '$'            >> $modit
  1195. X           echo '/^Disregard/'        >> $modit
  1196. X           echo 's/^/#/'        >> $modit
  1197. X           echo 'a'            >> $modit
  1198. X           echo '$dgard'        >> $modit
  1199. X           echo '.'            >> $modit
  1200. X           ;;
  1201. X        S) echo '$'            >> $modit
  1202. X           echo '/^SpooledNewsDir/'    >> $modit
  1203. X           echo 's/^/#/'        >> $modit
  1204. X           echo 'a'            >> $modit
  1205. X           echo '$spool'        >> $modit
  1206. X           echo '.'            >> $modit
  1207. X           ;;
  1208. X        P) echo '$'            >> $modit
  1209. X           echo '/^PostedGroups/'    >> $modit
  1210. X           echo 's/^/#/'        >> $modit
  1211. X           echo 'a'            >> $modit
  1212. X           echo '$pnews'        >> $modit
  1213. X           echo '.'            >> $modit
  1214. X           ;;
  1215. X        *) ;;
  1216. X        esac
  1217. X    done
  1218. X    # Do Ext= string and write quit
  1219. X    if [ " `egrep '^Ext=' $modfile`" = " " ]; then       # not there add it
  1220. X        echo '$'            >> $modit
  1221. X        echo 'a'            >> $modit
  1222. X        echo '$ext'            >> $modit
  1223. X        echo '.'            >> $modit
  1224. X    elif [ " `egrep '^Ext=' $modfile`" != " Ext=\".${Name}\"" ]; then
  1225. X        echo '$'            >> $modit
  1226. X        echo 's/^Ext=/#Ext=/'        >> $modit
  1227. X        echo 'a'            >> $modit
  1228. X        echo '$ext'            >> $modit
  1229. X        echo '.'            >> $modit
  1230. X    fi
  1231. X    echo 'w'            >> $modit
  1232. X    echo 'q'            >> $modit
  1233. X    echo '@EOF@'            >> $modit
  1234. X    #
  1235. X    # That's all of the script building stuff so let's use it.
  1236. X    #
  1237. X    chmod +x $modit
  1238. X    $modit < $modmods 2>&1 >/dev/null
  1239. X    #
  1240. X    # Test changes
  1241. X    #
  1242. X    set  $modfile
  1243. X    echo "Testing changes..."
  1244. X    echo "#!/bin/sh -u" > $testfile
  1245. X    sed -e 's,#.*$,,' $1 >> $testfile
  1246. X    echo `awk -f= '{if (NF != 2) next; printf "echo $%s; ", $1 }' \
  1247. X        $testfile` >> $testfile
  1248. X    chmod +x $testfile
  1249. X    $testfile >/dev/null
  1250. X    badfile=$?
  1251. X    #
  1252. X    # Check for multiple of three patterns
  1253. X    # on the Disregard Variable
  1254. X    #
  1255. X    badvar=0
  1256. X    egrep -s "^Disregard=none" $testfile
  1257. X    if [ $? = 1 ]; then
  1258. X        TestDisLine=`egrep '^Disregard' $testfile | \
  1259. X            awk -f= '{ print $2 }' | sed -e s,\",,g`
  1260. X        echo $TestDisLine | \
  1261. X            awk '{    if ( NF % 3 != 0 ) \
  1262. X                    { exit 1 } \
  1263. X                else \
  1264. X                    print $0 }' >/dev/null
  1265. X        badvar=$?
  1266. X    fi
  1267. X    #
  1268. X    # Check out Errors.
  1269. X    #
  1270. X    rm -f $testfile
  1271. X    if [ $badvar = 1 ]; then
  1272. X        echo "$0: Bad setup file $1"
  1273. X        echo "$0: Disregard Variable not modulo three fields"
  1274. X    fi
  1275. X    if [ $badfile = 1 ]; then
  1276. X        echo "$0: Bad setup file $1"
  1277. X        echo "$0: Variables may not contain #'s characters"
  1278. X        echo "$0: Disregard Fields:"
  1279. X        echo $TestDisLine | awk '{ while (i++ < NF) \
  1280. X                    printf "\t%d:\t%s\n", i, $i}'
  1281. X    fi
  1282. X    #
  1283. X    # Check bad and make corrections.
  1284. X    #
  1285. X    if [ $badvar = 0 -a $badfile = 0 ]; then 
  1286. X        echo "Testing complete."
  1287. X        echo -n "Are these what you want [y]/n? "
  1288. X        read ans
  1289. X        if [ " $ans" != " n" ]; then
  1290. X            notdone=0        # Yes, so quit
  1291. X        else
  1292. X            echo -n "Quit [y]/n? "
  1293. X            read ans
  1294. X            if [ " $ans" != " n" ]; then
  1295. X                exit 0
  1296. X            fi
  1297. X        fi
  1298. X    fi
  1299. Xdone
  1300. Xcp $modfile ${jobs}/setup.$Name
  1301. END_OF_FILE
  1302.   if test 17976 -ne `wc -c <'maintjobs'`; then
  1303.     echo shar: \"'maintjobs'\" unpacked with wrong size!
  1304.   fi
  1305.   chmod +x 'maintjobs'
  1306.   # end of 'maintjobs'
  1307. fi
  1308. if test -f 'setup.default' -a "${1}" != "-c" ; then 
  1309.   echo shar: Will not clobber existing file \"'setup.default'\"
  1310. else
  1311.   echo shar: Extracting \"'setup.default'\" \(3682 characters\)
  1312.   sed "s/^X//" >'setup.default' <<'END_OF_FILE'
  1313. X# Distribution Functional Setup file with modified parameters
  1314. X# 
  1315. X# Comments in this file consist of an occurrence of '#' at the beginning
  1316. X# of a line and go until the end of that line.
  1317. X# 
  1318. X# 
  1319. X# Default directory and News groups
  1320. XSpooledNewsDir="/usr/spool/news/misc/jobs"
  1321. XPostedGroups="contract/* offered/* offered/entry/*"
  1322. X#
  1323. X# Default Area's
  1324. XArea="Portland Hillsboro Beaverton Aloha Oregon"
  1325. X#
  1326. X# Default Extended Area's Always keep ${Area} and add 'CA' or 'GA' or whatever
  1327. XExtendedArea="${Area} OR"
  1328. X# Default NeverTrust    - Articles that may contain information we don't
  1329. X#            want can be removed using never trust. Typically
  1330. X#            a small percentage of articles are posted by
  1331. X#            people thinking that the news groups searched are
  1332. X#            meant for requests for information instead of 
  1333. X#            being meant to provide requests for interested
  1334. X#            parties. Sometimes there are mistakes and flames
  1335. X#            all of which we don't want to see. NeverTrust
  1336. X#            provides a way to remove these once detected.
  1337. X#            You can add a usenet address or a word from the
  1338. X#            content which uniquely identifies this stream.
  1339. X#            You should also be careful to be *very* selective
  1340. X#            as there are no checks against the other variables.
  1341. X#NeverTrust="Looking^[for^[a^[job"
  1342. XNeverTrust=none
  1343. X#
  1344. X# Default OtherDisregards - These are patterns which are known to pop up
  1345. X#            in the 'other local company offerings' section because
  1346. X#            of the return address or other parts of the article.
  1347. X#            For eg. there is a Hillsboro Rd in Nashville which
  1348. X#            pop's up from a Recruiter posting from there.
  1349. X#            These poster's are usually very consistent when it
  1350. X#            comes to article net-etiquette so we don't waste 
  1351. X#            time on their likely out-of-area posts.
  1352. X#OtherDisregard="joeLocalBigCompanyInHR Nashville"
  1353. XOtherDisregard="none"
  1354. X#
  1355. X# Optional three argument field for redundant posts. All articles by
  1356. X#        the first pattern are replaced by a summary
  1357. X#        and shown at the top of the Other Company's list.
  1358. X#        We assume that these articles will have good net-etiquette.
  1359. X#        The second argument forms an article search pattern for
  1360. X#        a one line summary statement. The first occurrence of
  1361. X#        pattern 2 followed by a space or tab in the article will
  1362. X#        be what appears on each summary line.
  1363. X#        The third pattern is the contact person which must not
  1364. X#        contain any spaces (use underscores and/or dot's).
  1365. X#        You can also escape "*" with "\*", I've not tried others ;-).
  1366. X#    eg. "IRecruite Position IRecruite(Joe_Recruiter:800.555.1212)"
  1367. X#    The company "IRecruite", Each summary line starts after the first line
  1368. X#    with the string "Position " until the end of line is reached and
  1369. X#    the contact information is "IRecruite(Joe_Recruiter:800.555.1212)".
  1370. X# Disregard="IRecruite Position IRecruite(Joe_Recruiter:800.555.1212)"
  1371. XDisregard=none
  1372. X#
  1373. X# Ext A file extension helpful with managing multiple lists which go to
  1374. X#    multiple groups of people that may not have the same contacts.
  1375. X#    eg. You want the Default full list (no filename extension) to
  1376. X#    go to one group but you want a list which weeds out IRecruite
  1377. X#    articles to go to another. Soooo, You create multiple setup files
  1378. X#    that have different Ext's and print or email them after a late night
  1379. X#    run once a week. The file 'Last' in the 'jobdir' directory will
  1380. X#    contain the filename of the last listing and will look like '1993Jan01'
  1381. X#    which can be used for this purpose,
  1382. X#        eg. lpr -T JobListing < `cat ${jobdir}/Last`.MyGroup
  1383. X#        eg. mail -s JobListing joe@hireme.com < `cat ${jobdir}/Last
  1384. X#    where .MyGroup is the Ext file extension. lpr will print the MyGroup
  1385. X#    list off and joe@hireme.com will get the listing with no file extension.
  1386. X#    Note: You still must run the main script one time for each setup file.
  1387. XExt=""
  1388. END_OF_FILE
  1389.   if test 3682 -ne `wc -c <'setup.default'`; then
  1390.     echo shar: \"'setup.default'\" unpacked with wrong size!
  1391.   fi
  1392.   # end of 'setup.default'
  1393. fi
  1394. if test -f 'setup.example' -a "${1}" != "-c" ; then 
  1395.   echo shar: Will not clobber existing file \"'setup.example'\"
  1396. else
  1397.   echo shar: Extracting \"'setup.example'\" \(3739 characters\)
  1398.   sed "s/^X//" >'setup.example' <<'END_OF_FILE'
  1399. X# Distribution Functional Setup file with modified parameters
  1400. X# 
  1401. X# Comments in this file consist of an occurrence of '#' at the beginning
  1402. X# of a line and go until the end of that line.
  1403. X# 
  1404. X# Default directory and News groups
  1405. XSpooledNewsDir="/usr/spool/news/misc/jobs"
  1406. XPostedGroups="contract/* offered/*"
  1407. X#
  1408. X# Default Area's
  1409. XArea="Portland Hillsboro Beaverton Aloha Oregon"
  1410. X#
  1411. X# Default Extended Area's Always keep ${Area} and add 'CA' or 'GA' or whatever
  1412. XExtendedArea="${Area} OR"
  1413. X# Default NeverTrust    - Articles that may contain information we don't
  1414. X#            want can be removed using never trust. Typically
  1415. X#            a small percentage of articles are posted by
  1416. X#            people thinking that the news groups searched are
  1417. X#            meant for requests for information instead of 
  1418. X#            being meant to provide requests for interested
  1419. X#            parties. Sometimes there are mistakes and flames
  1420. X#            all of which we don't want to see. NeverTrust
  1421. X#            provides a way to remove these once detected.
  1422. X#            You can add a usenet address or a word from the
  1423. X#            content which uniquely identifies this stream.
  1424. X#            You should also be careful to be *very* selective
  1425. X#            as there are no checks against the other variables.
  1426. X#NeverTrust=none
  1427. XNeverTrust="Looking^[for^[a^[job"
  1428. X# Default OtherDisregards - These are patterns which are known to pop up
  1429. X#            in the 'other local company offerings' section because
  1430. X#            of the return address or other parts of the article.
  1431. X#            For eg. there is a Hillsboro Rd in Nashville which
  1432. X#            pop's up from a Recruiter posting from there.
  1433. X#            These poster's are usually very consistent when it
  1434. X#            comes to article net-etiquette so we don't waste 
  1435. X#            time on their likely out-of-area posts.
  1436. X#OtherDisregard="joeLocalBigCompanyInHR Nashville"
  1437. XOtherDisregard="NBI\'s Crush Nashville"
  1438. X#
  1439. X# Optional three argument field for redundant posts. All articles by
  1440. X#        the first pattern are replaced by a summary
  1441. X#        and shown at the top of the Other Company's list.
  1442. X#        We assume that these articles will have good net-etiquette.
  1443. X#        The second argument forms an article search pattern for
  1444. X#        a one line summary statement. The first occurrence of
  1445. X#        pattern 2 followed by a space or tab in the article will
  1446. X#        be what appears on each summary line.
  1447. X#        The third pattern is the contact person which must not
  1448. X#        contain any spaces (use underscores and/or dot's).
  1449. X#        You can also escape "*" with "\*", I've not tried others ;-).
  1450. X#    eg. "IRecruite Position IRecruite(Joe_Recruiter:800.555.1212)"
  1451. X#    The company "IRecruite", Each summary line starts after the first line
  1452. X#    with the string "Position " until the end of line is reached and
  1453. X#    the contact information is "IRecruite(Joe_Recruiter:800.555.1212)".
  1454. X# Disregard="IRecruite Position IRecruite(Joe_Recruiter:800.555.1212)"
  1455. X#Disregard="none"
  1456. XDisregard="NBI\'s \* NBI's(Joe_NoBody:555.1212)"
  1457. X#
  1458. X# Ext A file extension helpful with managing multiple lists which go to
  1459. X#    multiple groups of people that may not have the same contacts.
  1460. X#    eg. You want the Default full list (no filename extension) to
  1461. X#    go to one group but you want a list which weeds out IRecruite
  1462. X#    articles to go to another. Soooo, You create multiple setup files
  1463. X#    that have different Ext's and print or email them after a late night
  1464. X#    run once a week. The file 'Last' in the 'jobdir' directory will
  1465. X#    contain the filename of the last listing and will look like '1993Jan01'
  1466. X#    which can be used for this purpose,
  1467. X#        eg. lpr -T JobListing < `cat ${jobdir}/Last`.MyGroup
  1468. X#        eg. mail -s JobListing joe@hireme.com < `cat ${jobdir}/Last
  1469. X#    where .MyGroup is the Ext file extension. lpr will print the MyGroup
  1470. X#    list off and joe@hireme.com will get the listing with no file extension.
  1471. X#    Note: You still must run the main script one time for each setup file.
  1472. XExt=".example"
  1473. END_OF_FILE
  1474.   if test 3739 -ne `wc -c <'setup.example'`; then
  1475.     echo shar: \"'setup.example'\" unpacked with wrong size!
  1476.   fi
  1477.   # end of 'setup.example'
  1478. fi
  1479. if test -f 'setup.newyork' -a "${1}" != "-c" ; then 
  1480.   echo shar: Will not clobber existing file \"'setup.newyork'\"
  1481. else
  1482.   echo shar: Extracting \"'setup.newyork'\" \(3813 characters\)
  1483.   sed "s/^X//" >'setup.newyork' <<'END_OF_FILE'
  1484. X# Distribution Functional Setup file with modified parameters
  1485. X# 
  1486. X# Comments in this file consist of an occurrence of '#' at the beginning
  1487. X# of a line and go until the end of that line.
  1488. X# 
  1489. X# 
  1490. X# Default directory and News groups
  1491. XSpooledNewsDir="/usr/spool/news/misc/jobs"
  1492. XPostedGroups="contract/* offered/* offered/entry/*"
  1493. X#
  1494. X# Default Area's
  1495. X#Area="Portland Hillsboro Beaverton Aloha Oregon"
  1496. XArea="New^[York New^[Jersey ^[NY ^[NJ NYC Manhattan"
  1497. X#
  1498. X# Default Extended Area's Always keep ${Area} and add 'CA' or 'GA' or whatever
  1499. X#ExtendedArea="${Area} OR"
  1500. XExtendedArea="${Area} NY NJ ny/nj"
  1501. X# Default NeverTrust    - Articles that may contain information we don't
  1502. X#            want can be removed using never trust. Typically
  1503. X#            a small percentage of articles are posted by
  1504. X#            people thinking that the news groups searched are
  1505. X#            meant for requests for information instead of 
  1506. X#            being meant to provide requests for interested
  1507. X#            parties. Sometimes there are mistakes and flames
  1508. X#            all of which we don't want to see. NeverTrust
  1509. X#            provides a way to remove these once detected.
  1510. X#            You can add a usenet address or a word from the
  1511. X#            content which uniquely identifies this stream.
  1512. X#            You should also be careful to be *very* selective
  1513. X#            as there are no checks against the other variables.
  1514. X#NeverTrust=none
  1515. XNeverTrust="Subject:^[Re: RFD:^[misc.jobs Sample^[Contract Great^[Usenet^[Piss"
  1516. X#
  1517. X# Default OtherDisregards - These are patterns which are known to pop up
  1518. X#            in the 'other local company offerings' section because
  1519. X#            of the return address or other parts of the article.
  1520. X#            For eg. there is a Hillsboro Rd in Nashville which
  1521. X#            pop's up from a Recruiter posting from there.
  1522. X#            These poster's are usually very consistent when it
  1523. X#            comes to article net-etiquette so we don't waste 
  1524. X#            time on likely out-of-area posts.
  1525. X#OtherDisregard="Nashville stylistic"
  1526. XOtherDisregard=none
  1527. X#
  1528. X# Optional three argument field for redundant posts. All articles by
  1529. X#        the first pattern are replaced by a summary
  1530. X#        and shown at the top of the Other Company's list.
  1531. X#        We assume that these articles will have good net-etiquette.
  1532. X#        The second argument forms an article search pattern for
  1533. X#        a one line summary statement. The first occurrence of
  1534. X#        pattern 2 followed by a space or tab in the article will
  1535. X#        be what appears on each summary line.
  1536. X#        The third pattern is the contact person which must not
  1537. X#        contain any spaces (use underscores and/or dot's).
  1538. X#        You can also escape "'" with "\'", I've not tried others ;-).
  1539. X#    eg. "IRecruite Position IRecruite(Joe_Recruiter:800.555.1212)"
  1540. X#    The company "IRecruite", Each summary line starts after the first line
  1541. X#    with the string "Position " until the end of line is reached and
  1542. X#    the contact information is "IRecruite(Joe_Recruiter:800.555.1212)".
  1543. X# Disregard="IRecruite Position IRecruite(Joe_Recruiter:800.555.1212)"
  1544. XDisregard=none
  1545. X#
  1546. X# Ext A file extension helpful with managing multiple lists which go to
  1547. X#    multiple groups of people that may not have the same contacts.
  1548. X#    eg. You want the Default full list (no filename extension) to
  1549. X#    go to one group but you want a list which weeds out IRecruite
  1550. X#    articles to go to another. Soooo, You create multiple setup files
  1551. X#    that have different Ext's and print or email them after a late night
  1552. X#    run once a week. The file 'Last' in the 'jobdir' directory will
  1553. X#    contain the filename of the last listing and will look like '1993Jan01'
  1554. X#    which can be used for this purpose,
  1555. X#        eg. lpr -T JobListing < `cat ${jobdir}/Last`.MyGroup
  1556. X#        eg. mail -s JobListing joe@hireme.com < `cat ${jobdir}/Last
  1557. X#    where .MyGroup is the Ext file extension. lpr will print the MyGroup
  1558. X#    list off and joe@hireme.com will get the listing with no file extension.
  1559. X#    Note: You still must run the main script one time for each setup file.
  1560. X#Ext=""
  1561. XExt=".newyork"
  1562. END_OF_FILE
  1563.   if test 3813 -ne `wc -c <'setup.newyork'`; then
  1564.     echo shar: \"'setup.newyork'\" unpacked with wrong size!
  1565.   fi
  1566.   # end of 'setup.newyork'
  1567. fi
  1568. echo shar: End of archive 1 \(of 2\).
  1569. cp /dev/null ark1isdone
  1570. MISSING=""
  1571. for I in 1 2 ; do
  1572.     if test ! -f ark${I}isdone ; then
  1573.     MISSING="${MISSING} ${I}"
  1574.     fi
  1575. done
  1576. if test "${MISSING}" = "" ; then
  1577.     echo You have unpacked both archives.
  1578.     rm -f ark[1-9]isdone
  1579. else
  1580.     echo You still must unpack the following archives:
  1581.     echo "        " ${MISSING}
  1582. fi
  1583. exit 0
  1584. exit 0 # Just in case...
  1585.