Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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/</\n</g'|\
- grep "data-productid"|\
- cut -d\" -f2,4,8|\
- tr -d "," >> 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement