I came across this sed command in a script to compare a machine's local binaries to GTFObins binaries.
for i in $(curl -s https://gtfobins.github.io/ | html2text | cut -d" " -f1 | sed '/^[[:space:]]*$/d');
do
if grep -q "$i" installed_pkgs.list;
then
echo "Check GTFO for: $i";
fi;
done
I have tested it and found that it deletes the spaces between lines, but I don't understand its form or how it is written.
curl -s https://gtfobins.github.io/ | grep -Po 'class="bin-name">\K[^<]+' | grep -Fxf - installed_pkgs.list
– Stéphane Chazelas Nov 23 '23 at 17:19