Skip to content
AgileLogics
Beginner 5 min read

Beginner Projects

Prerequisites: Level 1 — Beginner

Build these as scripts using what Level 1 covered — commands, pipes, redirection, variables, quoting, conditionals, and loops. Start each file with #!/usr/bin/env bash and make it executable with chmod +x.

1. Project Folder Generator

Write new-project.sh that takes a project name and creates a standard folder structure (src/, tests/, docs/), a README.md with the project name as its title, and a .gitignore. Refuse to run if the folder already exists.

2. File Organizer

Loop over the files in a folder and move each into a subfolder by its extension — images/ for .jpg and .png, documents/ for .pdf and .docx, and other/ for everything else — using a case statement. Print a summary of how many files went where.

3. Backup Script

Create a timestamped .tar.gz archive of a folder (backup-2025-04-22.tar.gz) using date +%F, store it in a backups folder, and delete backups older than 7 days with find.

4. System Report

Print a short report: current user, hostname, date, disk usage of the home folder (du -sh), free disk space (df -h), and the five largest files in a folder you choose.

5. Log Summary

Given a web-server-style log file, print the total number of lines, the number of lines containing ERROR, and the ten most common IP addresses, using grep, wc, cut, sort, and uniq -c.