find something (wget/curl -> grep, regex)

find something specific in remote file (output is a line containing searched string):

wget -q -O - domain.com/core/install.php | grep site-version
                  <span class="site-version">8.6.3</span>

curl -s domain.com/core/install.php | grep site-version
                  <span class="site-version">8.6.3</span>

curl -s drupals-test-domain.com/drupal-8.5.1/core/install.php | grep site-version | grep -oE "[0-9]+\.[0-9]+\.[0-9]+"
8.5.1

the last command return the best result.

 

Značky