Find and replace text in Linux terminal, bash scripts or Jenkinsfiles

I manage the build process for Android applications. Part of the process automatically updates the version of the application in various build.gradle files. In a Jenkinsfile, a list of file paths are passed into a for-loop in which the find-and-replace sed command is run to set the new version number. Sed for Find-and-Replace Sed is a library used for performing all sorts of text operations, which makes it very handy for scripting related work....

December 1, 2021 · 2 min · Shariq Jamil

Refactoring/Find-&-Replace on a WordPress site

I help my dad maintain a WordPress site for his business. He recently opened a new location and needed a new WordPress site created for it. The only differences between the two sites are the branch name (ex. ‘Los Angeles’ instead of ‘San Diego’) and phone number (‘111-222-3333’ instead of ‘222-333-4444’). The site is not stored in version control so downloading the source code, using an IDE to run find/replace and pushing updates wasn’t a straight-forward option....

August 9, 2021 · 2 min · Shariq Jamil

Erasing personal data from hard drives or solid-state drives

Over the years I have ended up with roughly a half dozen computers in various stages of decay. Two water-damaged Macbooks. An old HP laptop my dad handed down to me to “make faster and find a home for”. A gaming desktop from college that was caked in dust and shorted when powered up ten years later. One task I had to perform for all these machines was to collect and remove any personal data from internal storage (hard drives/solid-state drives)....

April 12, 2021 · 4 min · Shariq Jamil

Installing Hugo in Linux (Ubuntu)

To begin working on the blog, I needed to install Hugo first. My laptop runs Pop_OS!, a Linux distribution based on Ubuntu. There are quite a few ways to install Hugo and I chose to install the official package using apt-get. sudo apt-get install hugo Once the installation was complete, I verified that it completed successfully. hugo version As shown in the screenshot below, Hugo version 0.74.3 installed successfully on my machine....

March 20, 2021 · 1 min · Shariq Jamil