On 7 Jun 2023 at 17:10, Go Canes wrote:

From:                   Go Canes <letsgonhlcan...@gmail.com>
Date sent:              Wed, 7 Jun 2023 17:10:51 -0400
Subject:                Re: OT: Working on script to add 
Memtest86+ version 6.20 to Fedora
        boot menu
To:                     mi...@guam.net,
        Community support for Fedora users 
<users@lists.fedoraproject.org>
Send reply to:          Community support for Fedora 
users <users@lists.fedoraproject.org>

> On Wed, Jun 7, 2023 at 12:53 PM Michael D. Setzer II via users
> <users@lists.fedoraproject.org> wrote:
> > rm index.html -f
> > wget https://memtest.org/
> > f=$(grep -m1 binaries.zip <index.html | cut -f2 -d\")
> > rm index.html -f
> [...]
> > Thanks for any suggestions..
> 
> replace above with:
> 
> f=$(wget -O - https://memtest.org/ 2>/dev/null | grep -m1 binaries.zip
> | sed -e 's/.*<a href="//' -e 's/".*//')
> if [ -z "$f" ]
> then
>   echo "Unable to get pathname for binaries.zip" >&2
>   exit 1
> fi
> 
> this way you avoid creating the temporary file and therefore don't
> have to worry about deleting.  Also checks to make sure you actually
> got a pathname.  Should also be somewhat more tolerant of changes to
> the underlying html.

Thanks for the suggestions. Seems the index.html has 
kept the same format for the 6.0, 6.01, 6.10, and current 
6.20 versions, but they could change it at some point.
Have posted to their discussion forum but no response.

Thanks again.

> _______________________________________________
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
> Do not reply to spam, report it: 
> https://pagure.io/fedora-infrastructure/new_issue


+------------------------------------------------------------+
 Michael D. Setzer II - Computer Science Instructor 
(Retired)     
 mailto:mi...@guam.net                            
 mailto:msetze...@gmail.com
 Guam - Where America's Day Begins                        
 G4L Disk Imaging Project maintainer 
 http://sourceforge.net/projects/g4l/
+------------------------------------------------------------+


_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to