WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: list core versions curntly hosted at tinycorelinux.net or mirrors  (Read 61 times)

Offline mocore

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 769
  • ~.~

list of currently hosted versions

newline separated array

using shell wget and awk

Code: [Select]
tc_dl=$( wget -O-  http://tinycorelinux.net/downloads.html 2>/dev/null )

st='<td class="releases_past"';

# archives
echo "$tc_dl" | awk -v"st=$st" 'function rem(str,str2){ gsub(str,(str2 ==""?"":str2) , $0) } {if( $0 ~ st ) { rem("<a href=\42","\n");rem("\42>[0-9]*[0-9].x</a>");rem("</td>")  ;print  } }' | awk -F'/' '{sub("\\.x","",$1); if(NR>1) print $1 }'

#current
wget -O- http://tinycorelinux.net/latest 2>/dev/null

Quote from: eg
5
6
7
8
9
10
11
12
13
14
15
16
17.0