Skip to content

ZoboZoro/scripting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧩 Bash Automation Scripts

This repository contains Bash scripts designed to automate data ETL, file management tasks. Each script demonstrates shell scripting techniques for automation, data organization, and reproducible workflows.

πŸ“œ Overview

alt text

.
β”œβ”€β”€ scripts/              # Downloaded raw files
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ raw/               # Downloaded raw files
β”‚   β”œβ”€β”€ transformed/       # After field transformation
β”‚   β”œβ”€β”€ gold/              # After filtering
β”‚   └── json_and_CSV/      # JSON and CSV  files ready for import
β”œβ”€β”€ logs/
β”œβ”€β”€ .env                   # env file
└── README.md

1️⃣ dir_pipeline.sh – ETL Workflow

A lightweight ETL (Extract, Transform, Load) process implemented entirely in Bash.

Workflow

Extract – Downloads a dataset from a given web URL.

Transform – Performs transformations (e.g., column renaming, filtering, cleanup).

Load – Saves intermediate and final data into dedicated directories representing transformation layers.

2️⃣ file_manager.sh – File Organizer

A utility script that scans a parent directory for data files and organizes them by type.

Features

Detects .csv and .json files.

Moves each file to dedicated folder for both csv and json types

Skips if no matching files are found.

3️⃣ db_etl.sh – CSV-to-PostgreSQL Loader

This script ingests multiple CSV files into a PostgreSQL database.

Workflow

Scan Directory – Iterates through all .csv files in a given folder.

Database Connection – Connects to a PostgreSQL instance using provided credentials.

Table Management – For each file:

Creates a corresponding table (if it doesn’t exist).

Loads the CSV content into the table.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages