<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Script to fetch actual Jumbo Hotfix take details in Scripts</title>
    <link>https://community.checkpoint.com/t5/Scripts/Script-to-fetch-actual-Jumbo-Hotfix-take-details/m-p/148889#M945</link>
    <description>&lt;P&gt;There was a serious itch&amp;nbsp; had to scratch where I want to get a fast overview of the current General Availability and Ongoing Jumbo Hotfix details.&lt;/P&gt;
&lt;P&gt;Due to the restructuring of information I had to redesign my tool and it ended up to be a relative simple bash script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;#!/bin/bash

#       Fetch Check Point HFA details
#       Design by Hugo van der Kooij

CURL="curl -s"
BASE="https://sc1.checkpoint.com/documents/Jumbo_HFA"

for VER in R80.20 R80.30 R80.40 R81 R81.10
do
        if [ $VER = "R81" ]; then
                VER2="R81.00"
        else
                VER2=$VER
        fi
        echo " *** Version $VER ***"
        $CURL "${BASE}/${VER}/${VER2}/List-of-Takes.htm" | \
                grep "Take" | \
                grep -v "Archive" | \
                grep "General" | \
                sed "s/.*\"&amp;gt;//g" | \
                sed "s/&amp;lt;.*//g" | \
                head -1
        $CURL "${BASE}/${VER}/${VER2}/List-of-Takes.htm" | \
                grep "Take" | \
                grep "Ongoing" | \
                sed "s/.*\"&amp;gt;//g" | \
                sed "s/&amp;lt;.*//g" | \
                head -1
done&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Dec 2022 16:07:48 GMT</pubDate>
    <dc:creator>Hugo_vd_Kooij</dc:creator>
    <dc:date>2022-12-29T16:07:48Z</dc:date>
    <item>
      <title>Script to fetch actual Jumbo Hotfix take details</title>
      <link>https://community.checkpoint.com/t5/Scripts/Script-to-fetch-actual-Jumbo-Hotfix-take-details/m-p/148889#M945</link>
      <description>&lt;P&gt;There was a serious itch&amp;nbsp; had to scratch where I want to get a fast overview of the current General Availability and Ongoing Jumbo Hotfix details.&lt;/P&gt;
&lt;P&gt;Due to the restructuring of information I had to redesign my tool and it ended up to be a relative simple bash script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;#!/bin/bash

#       Fetch Check Point HFA details
#       Design by Hugo van der Kooij

CURL="curl -s"
BASE="https://sc1.checkpoint.com/documents/Jumbo_HFA"

for VER in R80.20 R80.30 R80.40 R81 R81.10
do
        if [ $VER = "R81" ]; then
                VER2="R81.00"
        else
                VER2=$VER
        fi
        echo " *** Version $VER ***"
        $CURL "${BASE}/${VER}/${VER2}/List-of-Takes.htm" | \
                grep "Take" | \
                grep -v "Archive" | \
                grep "General" | \
                sed "s/.*\"&amp;gt;//g" | \
                sed "s/&amp;lt;.*//g" | \
                head -1
        $CURL "${BASE}/${VER}/${VER2}/List-of-Takes.htm" | \
                grep "Take" | \
                grep "Ongoing" | \
                sed "s/.*\"&amp;gt;//g" | \
                sed "s/&amp;lt;.*//g" | \
                head -1
done&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Dec 2022 16:07:48 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Script-to-fetch-actual-Jumbo-Hotfix-take-details/m-p/148889#M945</guid>
      <dc:creator>Hugo_vd_Kooij</dc:creator>
      <dc:date>2022-12-29T16:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Script to fetch actual Jumbo Hotfix take details</title>
      <link>https://community.checkpoint.com/t5/Scripts/Script-to-fetch-actual-Jumbo-Hotfix-take-details/m-p/148892#M946</link>
      <description>&lt;P&gt;I had to fix the script a bit and the script above has been changed about 30 minutes after the original post to resolve the issue with R81&lt;/P&gt;
&lt;P&gt;It now runs well ....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt; *** Version R80.20 ***
Take 205 - General Availability
Take 211 - Ongoing
 *** Version R80.30 ***
Take 246 - General Availability
Take 251 - Ongoing
 *** Version R80.40 ***
Take 158 - General Availability
Take 153 - Ongoing
 *** Version R81 ***
Take 65 - General Availability
Take 68 - Ongoing
 *** Version R81.10 ***
Take 45 - General Availability
Take 55 - Ongoing&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 11:57:36 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Script-to-fetch-actual-Jumbo-Hotfix-take-details/m-p/148892#M946</guid>
      <dc:creator>Hugo_vd_Kooij</dc:creator>
      <dc:date>2022-05-18T11:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Script to fetch actual Jumbo Hotfix take details</title>
      <link>https://community.checkpoint.com/t5/Scripts/Script-to-fetch-actual-Jumbo-Hotfix-take-details/m-p/149430#M951</link>
      <description>&lt;P&gt;Well. It didn't take Check point that long to break my script. So I am back to hacking my way back in. Stay tuned.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 10:03:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Script-to-fetch-actual-Jumbo-Hotfix-take-details/m-p/149430#M951</guid>
      <dc:creator>Hugo_vd_Kooij</dc:creator>
      <dc:date>2022-05-25T10:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Script to fetch actual Jumbo Hotfix take details</title>
      <link>https://community.checkpoint.com/t5/Scripts/Script-to-fetch-actual-Jumbo-Hotfix-take-details/m-p/149432#M952</link>
      <description>&lt;P&gt;New version:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#!/bin/bash

#       Fetch Check Point HFA details
#       Design by Hugo van der Kooij

CURL="curl -s"
BASE="https://sc1.checkpoint.com/documents/Jumbo_HFA"

for VER in R80.20 R80.30 R80.40 R81 R81.10
do
        if [ $VER = "R81" ]; then
                VER2="R81.00"
        else
                VER2=$VER
        fi
        echo " *** Version $VER ***"
        $CURL "${BASE}/${VER}/${VER2}/${VER2}-List-of-all-Resolved-Issues.htm" | \
                grep "Take" | \
                grep -v "Archive" | \
                grep "General" | \
                sed "s/.*\"&amp;gt;//g" | \
                sed "s/&amp;lt;.*//g" | \
                head -1
#       $CURL "${BASE}/${VER}/${VER2}/List-of-Takes.htm" | \
        $CURL "${BASE}/${VER}/${VER2}/${VER2}-List-of-all-Resolved-Issues.htm" | \
                grep "Take" | \
                grep "Ongoing" | \
                sed "s/.*\"&amp;gt;//g" | \
                sed "s/&amp;lt;.*//g" | \
                head -1
done&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 25 May 2022 10:42:35 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Script-to-fetch-actual-Jumbo-Hotfix-take-details/m-p/149432#M952</guid>
      <dc:creator>Hugo_vd_Kooij</dc:creator>
      <dc:date>2022-05-25T10:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Script to fetch actual Jumbo Hotfix take details</title>
      <link>https://community.checkpoint.com/t5/Scripts/Script-to-fetch-actual-Jumbo-Hotfix-take-details/m-p/176491#M1100</link>
      <description>&lt;P&gt;You can replace your collection of sed/grep with some parsing via xmllint. &amp;nbsp;You'll need to save the output from curl to a file and do an ugly force-feeding to xmllint to get pretty-ish output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;$CURL "${BASE}/${VER}/${VER2}/${VER2}-List-of-all-Resolved-Issues.htm" |\
xmllint --html --xpath '//table[@class="TableStyle-TP_Table_Dark_Header_and_Pattern"]/tbody/tr[1]' - 2&amp;gt;/dev/null ;echo

&lt;/LI-CODE&gt;
&lt;P&gt;et voilà:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;for VER in R80.20 R80.30 R80.40 R81 R81.10
do
  if [ $VER = "R81" ]; then
    VER2="R81.00"
  else
    VER2=$VER
  fi
  echo -n "$VER "
  curl -s -k  "${BASE}/${VER}/${VER2}/${VER2}-List-of-all-Resolved-Issues.htm" |\
  xmllint --html --xpath '//table[@class="TableStyle-TP_Table_Dark_Header_and_Pattern"]/tbody/tr[1]/td/p/a/text()' - 2&amp;gt;/dev/null
  echo
done

R80.20 Take 230 - General Availability 
R80.30 Take 255 - General Availability
R80.40 Take 196
R81 Take 82
R81.10 Take 93
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Until Check Point web devs change the HTML structure for R82 .... &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2023 21:58:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Script-to-fetch-actual-Jumbo-Hotfix-take-details/m-p/176491#M1100</guid>
      <dc:creator>Duane_Toler</dc:creator>
      <dc:date>2023-03-28T21:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Script to fetch actual Jumbo Hotfix take details</title>
      <link>https://community.checkpoint.com/t5/Scripts/Script-to-fetch-actual-Jumbo-Hotfix-take-details/m-p/176627#M1101</link>
      <description>&lt;P&gt;&lt;SPAN&gt;To make it closer to your original:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl -s -k  https://sc1.checkpoint.com/documents/Jumbo_HFA/${VER}/${VER2}/${VER2}-List-of-all-Resolved-Issues.htm |\
xmllint --html --xpath 'concat(//table[@class="TableStyle-TP_Table_Dark_Header_and_Pattern"]/tbody/tr[(contains(.//td[3]/p/text(),"-"))][1]/td[1]/p/a/text()," Ongoing
", //table[@class="TableStyle-TP_Table_Dark_Header_and_Pattern"]/tbody/tr[not (contains(.//td[3]/p/text(),"-"))][1]/td[1]/p/a/text(), " Recommended
")' -  2&amp;gt;/dev/null
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's a literal carriage-return in the text after the two strings so that a line break appears (xmllint can't really do "\n" like nature intended...&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_with_rolling_eyes:"&gt;🙄&lt;/span&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;LI-CODE lang="java"&gt; *** Version R80.20 ***
Take 210 - Ongoing Ongoing
Take 230 - General Availability  Recommended

 *** Version R80.30 ***
Take 245 - Ongoing Ongoing
Take 255 - General Availability Recommended

 *** Version R80.40 ***
Take 196 Ongoing
Take 192 Recommended

 *** Version R81 ***
Take 82 Ongoing
Take 81 Recommended

 *** Version R81.10 ***
Take 94 Ongoing
Take 87 Recommended
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So now someone can incorporate this into an Ansible playbook, or whatever else you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 15:57:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Script-to-fetch-actual-Jumbo-Hotfix-take-details/m-p/176627#M1101</guid>
      <dc:creator>Duane_Toler</dc:creator>
      <dc:date>2023-03-29T15:57:14Z</dc:date>
    </item>
  </channel>
</rss>

