Bash tricks for web maintenance

Bash Your Website

© Lead Image © tawhy, 123RF.com

© Lead Image © tawhy, 123RF.com

Article from Issue 290/2025
Author(s):

Use tools such as grep and sed to find and fix broken links.

I was recently asked to help with some issues on a personal website. After reviewing the problems, I was happily surprised to find that I could solve most of the issues with some simple Bash commands (Figure 1).

In this article, I will look at how to use a few lines of Bash to:

  • find missing local link addresses,
  • find unlinked or unused pages,
  • find bad external URL links, and
  • search the website and replace incorrect text and links.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Bash Data Gathering

    With some simple Bash commands, you can gather, parse, and filter text data into CSV files ready for your favorite statistical application.

  • Shell Download Manager

    A few lines of shell code and the Gawk scripting language make downloading files off the web a breeze.

  • Gemini Protocol

    Create Gemini pages to show sensor data or control a Raspberry Pi rover.

  • Bash Alternatives

    Don't let your familiarity with the Bash shell stop you from exploring other options. We take a look at a pair of alternatives that are easy to install and easy to use: Zsh and fish.

  • smenu

    The smenu tool reduces the effort of creating shell menus to one line, with numerous options for a wide range of design alternatives.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News