Advertisement
LittleJok3r

check wordpress version

Jul 13th, 2019
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.38 KB | None | 0 0
  1. #!/bin/bash
  2. #checking wordpress version
  3.  check(){
  4.  if [[ `curl -s "${s}/feed/"` =~ 'https://wordpress.org/?v=' ]]
  5.  then
  6.  grep=`curl -s "${s}/feed/" | grep -Po '(?<=press.org/)[^"]*(</generator>)' | tr -d '?v=' | tr -d '</generator>'`
  7.  echo "Version is ${grep}"
  8.  echo "${s}">>$grep.txt
  9. else
  10.     echo "can't get version"
  11. fi
  12.  }
  13.  for s in `cat $1`; do
  14.   echo "$s"
  15.   check $s
  16.   done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement