2
# Uudecodes all uuencoded files in current working directory.
4
lines=35 # Allow 35 lines for the header (very generous).
6
for File in * # Test all the files in $PWD.
8
search1=`head -n $lines $File | grep begin | wc -w`
9
search2=`tail -n $lines $File | grep end | wc -w`
10
# Uuencoded files have a "begin" near the beginning,
11
#+ and an "end" near the end.
12
if [ "$search1" -gt 0 ]
14
if [ "$search2" -gt 0 ]
16
echo "uudecoding - $File -"
22
# Note that running this script upon itself fools it
23
#+ into thinking it is a uuencoded file,
24
#+ because it contains both "begin" and "end".
28
# Modify this script to check each file for a newsgroup header,
29
#+ and skip to next if not found.