About Pinging URLs instead of Domains

The ping command accepts only the domain name, so if you copy a URL from a browser, you always need to manually delete the protocol there.

As a workaround, you can create a wrapper function in ~/.zshrc or ~/.bashrc that accepts any URL or domain:

pingurl() {
    ping "$(echo "$1" | sed -E 's#^(https?://)?([^/]+).*#\2#')"
}

Use it as follows:

$ pingurl https://example.com

Tips and Tricks Programming Dev Ops Bash Zsh

Django/Python Consulting

If you have a specific Django challenge or integration you'd like to solve, I'd be happy to help. Book a free 30-minute call to discuss your project, see if we're a good fit, and explore the best approach for your needs. After the call, you'll receive a tailored cost estimate based on what we discuss.