home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Unix System Administration Handbook 1997 October
/
usah_oct97.iso
/
news
/
cnews.tar
/
batch
/
batchcheck
next >
Wrap
Text File
|
1994-08-17
|
548b
|
31 lines
#! /bin/sh
# Check for existence of files in a batch, passing through only batchfile
# entries for files that exist. -v reverses sense of test.
# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/etc/news/bin/config}
PATH=$NEWSCTL/bin:$NEWSBIN/batch:$NEWSBIN:$NEWSPATH ; export PATH
umask $NEWSUMASK
case "$1" in
-*) opt="$1" ; shift ;;
esac
cd $NEWSARTS
while read name rest
do
out=n
case "$name" in
'<'*'>') out=y ;;
*) if test -f "$name"
then
out=y
fi
;;
esac
case "$out$opt" in
y|n-v) echo "$name $rest" ;;
esac
done