chill wrote: 
> In case it helps to make your scripts more future-proof, I spotted that
> the download links are visible within the source of the ngrok download
> page.  So if, or instance, they notice that the ARM64 download is the
> odd one out with its tgz format, or they change the apparently random
> characters in the download path, then you don't need to rely on
> hard-coded filenames.  This code will extract the filenames, based only
> on the text in the drop-down menu, which seems more likely to remain
> constant:
> 
> > 
Code:
--------------------
  >   > filename32=$(wget https://ngrok.com/download -O - | grep -B 1 "Linux 
(ARM)" | awk -F href\=\" {'print $2'} | awk -F \" {'print $1'})
  > filename64=$(wget https://ngrok.com/download -O - | grep -B 1 "Linux 
(ARM64)" | awk -F href\=\" {'print $2'} | awk -F \" {'print $1'})
  > 
--------------------
> > 

That's a great idea - I'll take it on board. Thanks ! Nice use of grep
-B :cool:


------------------------------------------------------------------------
philchillbill's Profile: http://forums.slimdevices.com/member.php?userid=68920
View this thread: http://forums.slimdevices.com/showthread.php?t=111016

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to