Shell Script: Get HTTP Header

Objective: Get HTTP response headers of a URL in a shell script.

We can use either curl or wget to get HTTP headers.

For curl, use the following syntax.

wget normally follows HTTP redirect (HTTP status code 30x). To prevent wget from following redirects, we have to use the “--max-redirect 0” option. Use wget with the following syntax.

ibrahim = { interested_in(unix, linux, android, open_source, reverse_engineering); coding(c, shell, php, python, java, javascript, nodejs, react); plays_on(xbox, ps4); linux_desktop_user(true); }