CCCPaste

Ferguson Catalog Generator

#!/bin/bash

wget -U "ferg" -mkEpnp "https://www.ferguson.com/category/"

find www.ferguson.com/category -type d -name "*plumb*"|\
  while read folder;
  do
    find $folder -iname "*.html"|
      while read f
      do
        cat "$f";done |\
          tr -d "\n"|\
          sed 's/> products.lst
        done
        sort -u products.lst -o products.lst

        cat products.lst|\
          cut -d\/ -f5,7|\
          tr "/" '"'|\
          tr "-" " "|\
          cut -d\" -f1,3,4|\
          fzf|\
          tr '"' "\n" 

echo -n "Number of Products Found: "
wc -l products.lst