Skip to content

Manually checking URLs can be time-consuming and error-prone, but with the power of shell scripting in Linux, we can automate this task.

Notifications You must be signed in to change notification settings

NashTech-Labs/check_url_validity_curl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

URL Validity Checker Script

This script allows you to check the validity of one or more URLs by sending HTTP requests and analyzing the response codes. It's a useful tool for ensuring that the URLs in your system are reachable and returning the expected HTTP status codes.

Features

  • Check the status of a single URL or multiple URLs from a file.
  • Supports curl to make HTTP requests.
  • Handles HTTP status codes and classifies the URL as valid or invalid.
  • Provides easy-to-read output in the terminal.

Prerequisites

Ensure that you have the following installed on your system:

  • Bash: A Unix shell that runs the script.
  • cURL: Used to send HTTP requests.

To check if cURL is installed, run:

curl --version

Usage

Clone or download the script: Download the check_url.sh script to your system.

Make the script executable: You need to give execute permissions to the script before using it. Run:

chmod +x check_url.sh

Run the script for a single URL: You can provide a URL directly when running the script:

./check_url.sh https://www.google.com

About

Manually checking URLs can be time-consuming and error-prone, but with the power of shell scripting in Linux, we can automate this task.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages