This script shows the recommended and latest versions for JHAs
#!/bin/bash
if [ -f /etc/profile.d/CP.sh ]; then
CURL="curl_cli -s"
else
CURL="curl -s"
fi
clear; printf "
# Recommended & Latest Jumbo Hotfix Accumulators per version
Version | Recommended | Latest
--------+-------------+---------
"
for VER in R80.40 R81 R81.10 R81.20; do
if [ $VER = "R81" ]; then
VER2="R81.00"
else
VER2=$VER
fi
TAKE_URL="http://sc1.checkpoint.com/documents/Jumbo_HFA/$VER/$VER2/"
$CURL "$TAKE_URL/${VER2}_Downloads.htm" |
awk ' /<h1>/ { version=substr($1,5) }
/Take.+Recommended/ { take_r=$2 }
/Take.+Latest/ { take_l=$2 }
END { printf( "%-7s | Take %-6s | Take %s\n", version, take_r, take_l?take_l:take_r) }'
done
printf "\n"