1 2 3 4 5 6 7 8
#!/bin/bash curl "http://zlib.net/pigz/" 2> /dev/null | \ tr "\"" "\n" | \ grep "^pigz-.*\.tar\.gz\$" | \ sed "s/^pigz-\(.*\)\.tar\.gz\$/\1/" | \ sort -V | \ tail -n1