In your script, you could use wget or curl or lynx to download that web page, 
then pipe it into some creative use of grep/sed/awk/perl to extract just the 
title, then another pipe to another round of grep/sed/awk/perl to get just the 
revision number.

Untested, but something like this should be close to working:
lynx -dump http://svn.savannah.gnu.org/svn/apl/trunk/ | sed '2q;d' | awk '{ 
print $3 }'

You might have to play around with the sed or the awk column or something, but 
this should be a good first step.

~Brian

________________________________
Brian Robert Callahan, Ph.D.
Lecturer, ITWS@RPI
Office: Amos Eaton 132
________________________________
From: Peter Teeson [peter.tee...@me.com]
Sent: Tuesday, September 22, 2020 3:33 PM
To: Callahan, Brian Robert
Cc: bug-apl@gnu.org
Subject: Re: How find GNUAPL svn repository revision number

Thanks for your reply but I don’t understand what you mean by ‘scrape that’


On Sep 22, 2020, at 2:21 PM, Callahan, Brian Robert 
<call...@rpi.edu<mailto:call...@rpi.edu>> wrote:

http://svn.savannah.gnu.org/svn/apl/trunk/
Will be in the page title. I'd say scrape that since it's easy to do so.

~Brian

________________________________
Brian Robert Callahan, Ph.D.
Lecturer, ITWS@RPI
Office: Amos Eaton 132
________________________________
From: Bug-apl 
[bug-apl-bounces+callab5=rpi....@gnu.org<mailto:bug-apl-bounces+callab5=rpi....@gnu.org>]
 on behalf of Peter Teeson [peter.tee...@me.com<mailto:peter.tee...@me.com>]
Sent: Tuesday, September 22, 2020 2:17 PM
To: bug-apl@gnu.org<mailto:bug-apl@gnu.org>
Subject: How find GNUAPL svn repository revision number

I’ve searched and read for the answer but come up dry.

I’m on macOS High Sierra
Assume I have svn co'd …trunk to a local working copy

I want to write a bash script to
    compare the local working copy revision number
vs
   the svn://svn.savannah.gnu.org/apl/trun<UrlBlockedError.aspx> repository 
revision number.

I know how to find out the revision number of my local working copy
using svnversion or svn info if i need more data.

My question:

But I don’t know how to script to get the revision number
of the svn://svn.savannah.gnu.org/apl/trun<UrlBlockedError.aspx>

Please help….

Thanks

Peter

Reply via email to