Skip to content

About

Command-line tools and automation scripts written in Bash

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Bash Scripts

A small collection of command-line tools I wrote from scratch while learning shell scripting and Linux fundamentals. Each script solves a real task and was built to practice argument handling, input validation, and clean shell code.

Scripts

investigate.sh

Takes a directory and reports its five most common file extensions, ranked by how many files use each one. Useful for quickly understanding what a directory is mostly made of.

Usage:

./investigate.sh <directory>

Example:

./investigate.sh ~/Downloads

It validates that the argument is a real directory before running, and prints a clear message otherwise.

backupgz.sh

Creates a compressed .tar.gz backup of a directory and verifies its integrity right after creating it. The archive is named with the directory name and the current date (for example, backup_projects_2026-07-14.tar.gz) and saved to ~/dev/backups/.

After creating the archive, the script reads it back to confirm it is valid and not corrupted, reporting whether the backup was verified successfully.

Usage:

./backupgz.sh <directory>

Example:

./backupgz.sh ~/projects

It validates that the argument is a real directory before running, and creates the backups folder automatically if it does not exist.

Requirements

  • A Unix-like environment (Linux, macOS, or WSL on Windows)
  • Bash
  • Standard GNU utilities: find, grep, sed, sort, uniq (for investigate.sh) and tar, gzip (for backupgz.sh)

Running

Make a script executable before running it:

chmod +x backupgz.sh
./backupgz.sh <directory>

Notes

These scripts were written as part of my journey learning software engineering, with a focus on backend and systems. They prioritize correctness and clear error handling. Feedback is welcome.

About

Command-line tools and automation scripts written in Bash

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages