{"id":20703649,"url":"https://github.com/cppmx/bash_scripts_unir","last_synced_at":"2026-04-18T23:03:29.829Z","repository":{"id":177318694,"uuid":"656406125","full_name":"cppmx/bash_scripts_unir","owner":"cppmx","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-03T16:44:36.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-17T19:55:18.711Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cppmx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2023-06-20T22:30:04.000Z","updated_at":"2023-06-21T00:04:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"08652cca-36a9-4088-8852-6f6e8828694b","html_url":"https://github.com/cppmx/bash_scripts_unir","commit_stats":null,"previous_names":["cppmx/bash_scripts_unir"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppmx%2Fbash_scripts_unir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppmx%2Fbash_scripts_unir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppmx%2Fbash_scripts_unir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cppmx%2Fbash_scripts_unir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cppmx","download_url":"https://codeload.github.com/cppmx/bash_scripts_unir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242970374,"owners_count":20214810,"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":[],"created_at":"2024-11-17T01:08:55.268Z","updated_at":"2026-04-18T23:03:24.753Z","avatar_url":"https://github.com/cppmx.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tarea de generación de scripts en BASH\n\nLa finalidad de esta tarea es familiarizarse con Bash y con varias utilidades GNU.\nEstas herramientas son la base de cualquier automatización en Linux.\n\n## Pre-requisitos\n\n- Tener Docker instalado o un sistema Linux con BASH.\n\n## Uso\n\n1. Clona este repositorio\n\n1.1 Si cuentas con una llave SSH\n\n```bash\ngit clone git@github.com:cppmx/bash_scripts_unir.git\n```\n\n1.2 Si no cuentas con una llave SSH\n```bash\ngit clone https://github.com/cppmx/bash_scripts_unir.git\n```\n\n2. Entra a el directorio del repositorio\n\n```bash\ncd bash_scripts_unir\n```\n\n### Con Docker\n\nEjecuta las pruebas usando el script `probar` y sigue las instrucciones. Ejemplo, si quieres ejecutar las pruebas del script 4:\n\n```bash\n./probar.sh \n¿Cuál script quieres probar? (1 al 5)\n4\n\nPRUEBA 1: Probando el script 4 con el parámetro /app/script4.sh /test/archivo1.txt /test/archivo2.txt\ncp: can't create '/test/archivo2.txt': File exists\nNo se pudo copiar el archivo.\nPRUEBA exitosa\n\n\nPRUEBA 2: Probando el script 4 con el parámetro /app/script4.sh /test/archivo3.txt /test/archivo4.txt\ncp: can't create '/test/archivo4.txt': File exists\nNo se pudo copiar el archivo.\nPRUEBA exitosa\n\n\nPRUEBA 3: Probando el script 4 con el parámetro /app/script4.sh /test/archivo1.txt /test/archivo3.txt\ncp: can't create '/test/archivo3.txt': File exists\nNo se pudo copiar el archivo.\nPRUEBA exitosa\n\n\nPRUEBA 4: Probando el script 4 con el parámetro /app/script4.sh /test/archivo4.txt /test/archivo2.txt\ncp: can't create '/test/archivo2.txt': File exists\nNo se pudo copiar el archivo.\nPRUEBA exitosa\n\n\nPRUEBA 5: Probando el script 4 con el parámetro /app/script4.sh /test/archivo3.txt\nUso: /app/script4.sh \u003carchivo_origen\u003e \u003carchivo_destino\u003e\nDescripción: Este script copia un archivo sobre otro.\n\nArgumentos:\n  \u003carchivo_origen\u003e    Ruta al archivo de origen que se desea copiar.\n  \u003carchivo_destino\u003e   Ruta al archivo de destino donde se copiará el archivo de origen.\nPRUEBA fallida\n\n\nPRUEBA 6: Probando el script 4 con el parámetro /app/script4.sh\nUso: /app/script4.sh \u003carchivo_origen\u003e \u003carchivo_destino\u003e\nDescripción: Este script copia un archivo sobre otro.\n\nArgumentos:\n  \u003carchivo_origen\u003e    Ruta al archivo de origen que se desea copiar.\n  \u003carchivo_destino\u003e   Ruta al archivo de destino donde se copiará el archivo de origen.\nPRUEBA fallida\n```\n\nSi no quieres usar el script, puedes ejecutar pruebas manualmente.\n\nCompila primero la imagen:\n\n```bash\ndocker build -t bash_test:unir .\n```\n\nLuego ejecuta una prueba:\n\n```bash\ndocker run --rm bash_test:unir /app/script1.sh /test\n```\n\n## Sin Docker\n\nSi ya estás usando una consola de BASH, ya sea en una distribución de Linux o MAC, puedes ejecutar directamente los sripts:\n\nEntra al directorio src:\n\n```bash\ncd src\n```\n\nEjecuta el script:\n\n```bash\n./script1.sh /tmp\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppmx%2Fbash_scripts_unir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcppmx%2Fbash_scripts_unir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcppmx%2Fbash_scripts_unir/lists"}