Files
svr/usr/bin/search-google
T
2026-04-01 11:54:53 +02:00

13 lines
226 B
Bash
Executable File

#!/usr/bin/env bash
q="$*"
[ -z "$q" ] && q="$(cat)"
q="${q// /+}"
curl -s -L \
-A "Mozilla/5.0" \
-b "CONSENT=YES+1" \
"https://www.google.com/search?q=$q&hl=en&udm=14" \
| grep -oP '(?<=href="/url\?q=)[^&]+' \
| head -n 5