{"id":20775110,"url":"https://github.com/deruina/bash_scripts","last_synced_at":"2026-05-06T19:35:46.569Z","repository":{"id":221120408,"uuid":"753500587","full_name":"DeRuina/bash_scripts","owner":"DeRuina","description":"Quick Scripts Overview: A playground of bash scripts for image management, trivia gaming, data backup, and log analysis, crafted out of curiosity and love for experimentation.","archived":false,"fork":false,"pushed_at":"2024-02-06T09:17:05.000Z","size":535,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T07:47:12.618Z","etag":null,"topics":["automation","backup","bash","bash-script","linux","trivia"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeRuina.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-06T08:49:07.000Z","updated_at":"2024-02-06T09:26:28.000Z","dependencies_parsed_at":"2024-02-06T09:46:29.256Z","dependency_job_id":"2e5943ab-7a12-4c74-a022-0cbf1caff197","html_url":"https://github.com/DeRuina/bash_scripts","commit_stats":null,"previous_names":["deruina/bash_scripts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeRuina%2Fbash_scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeRuina%2Fbash_scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeRuina%2Fbash_scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeRuina%2Fbash_scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeRuina","download_url":"https://codeload.github.com/DeRuina/bash_scripts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243113487,"owners_count":20238423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","backup","bash","bash-script","linux","trivia"],"created_at":"2024-11-17T12:34:33.676Z","updated_at":"2026-05-06T19:35:46.526Z","avatar_url":"https://github.com/DeRuina.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bash_scripts\n\nThis repository contains a collection of bash scripts for various tasks such as downloading images, playing a trivia game, backing up data, and analyzing web server logs. Each script is designed to perform a specific function and can be run independently or together depending on the needs of the user.\n\n## Scripts Included\n\n###  1. `analyze_logfile.sh`\n\nAn analysis script for Apache web server log files. It extracts and reports various statistics such as successful requests, requests for .zip files, IP addresses, and the most requested URL from Firefox browsers.\n\nUsage: `./analyze_logfile.sh \u003cpath_to_logfile\u003e`\nPermissions: `chmod +x analyze_logfile.sh`\n\n###  2. `backup_script.sh`\n\nA backup script that creates compressed archives of specified directories and also backs up a database using a separate script (`backup_db.sh` which is a replica for **mysqldump**). The script logs errors and exits with a specific exit code indicating the type of failure.\n\nUsage: `./backup_script.sh`\nPermissions: `chmod +x backup_script.sh`\n\n![backup](img/backup.png)\n\n###  3. `trivia.sh`\n\nA trivia game script that fetches questions from the Open Trivia Database API and presents them to the user. The user can answer questions and earn points based on the difficulty of the question.\n\nUsage: `./trivia.sh`\nPermissions: `chmod +x trivia.sh`\n\n![trivia](img/trivia1.png)\n![trivia](img/trivia2.png)\n\n###  4. `image_thumbnail.sh`\n\nThis script attempts to download images from a specified API endpoint and creates thumbnails for each downloaded image. It stops after  10 unsuccessful attempts to download an image.\n\nUsage: `./image_thumbnail.sh`\nPermissions: `chmod +x image_thumbnail.sh`\n\n\n## Prerequisites\n\n- **Bash**: Ensure that you have Bash installed on your system to execute these scripts.\n- **jq**: The `trivia.sh` script uses `jq` to parse JSON responses from the API. Make sure `jq` is installed.\n- **dialog**: The `trivia.sh` script uses `dialog` for creating menus and message boxes. Install `dialog` if you plan to use this script.\n- **tar**: The `backup_script.sh` script uses `tar` to create archives. Ensure `tar` is available on your system.\n- **bzip2**: The `backup_script.sh` script uses `bzip2` to compress files. Make sure `bzip2` is installed.\n- **grep**: The `analyze_logfile.sh` script uses `grep` to analyze log files. Confirm that `grep` is installed.\n\n## Usage\n\nTo use any of the scripts, navigate to the directory containing the script and execute it with the appropriate permissions. For example: `chmod +x image_thumbnail.sh`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderuina%2Fbash_scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderuina%2Fbash_scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderuina%2Fbash_scripts/lists"}