I'm making a bash script to ping a certain web address. The problem is, when I say:
ping https://www.dictionary.com/browse/word
then ping says
ping: https://www.dictionary.com/browse/word: Name or service not known
Can somebody please help me with this? What is a program that I can use to ping an https server.
I have to have the slashes there because I want to ping that certain page.
Thank you in advance.
You can use
httping
:If you want to check if your word exists, you need to specify, that only Status 200 is OK.
And maybe add
-c 1
to exit after 1 probe and-l
to avoid the Info message that SSL was auto enabled.Output:
Install via
Alternative, if
httping
is not available, of course it is possible withcurl
to print the status code of a request only.Ping only understands hostnames and ip-addresses. So in your example it should be:
But even this isn't sure to work, because icmp packets (which ping is a part of) might be blocked in router or firewalls along the way to the destination.