From 0676184638620d276ea2f7b1c9f1a0c17783b8df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcelo=20Z=C3=A1rate?= Date: Mon, 3 Oct 2022 11:06:23 -0300 Subject: [PATCH 1/2] 002-bash-structure es --- ebook/es/content/002-bash-structure.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ebook/es/content/002-bash-structure.md diff --git a/ebook/es/content/002-bash-structure.md b/ebook/es/content/002-bash-structure.md new file mode 100644 index 0000000..5a7db9f --- /dev/null +++ b/ebook/es/content/002-bash-structure.md @@ -0,0 +1,25 @@ +# Estructura de Bash + +Comencemos creando un nuevo archivo con extensión `.sh`. Como ejemplo, podríamos crear un archivo llamado `devdojo.sh`. + +Para crear ese archivo, puede usar el comando `touch`: + +``bash +touch devdojo.sh +``` + +O en vez de eso, puede usar su editor de texto: + +``bash +nano devdojo.sh +``` + +Para ejecutar/correr un archivo de script bash con el intérprete de shell bash, la primera línea de un archivo de script debe indicar la ruta absoluta al ejecutable bash: + +```bash +#!/bin/bash +``` + +Esto también se llama [Shebang](https://es.wikipedia.org/wiki/Shebang). + +Todo lo que hace el shebang es indicar al sistema operativo que ejecute el script con el ejecutable `/bin/bash`. From 144d877ce0bd0f7ccb9c4afc786b8083d3c35f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcelo=20Z=C3=A1rate?= Date: Mon, 3 Oct 2022 11:14:05 -0300 Subject: [PATCH 2/2] Add missing backticks --- ebook/es/content/002-bash-structure.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ebook/es/content/002-bash-structure.md b/ebook/es/content/002-bash-structure.md index 5a7db9f..87296de 100644 --- a/ebook/es/content/002-bash-structure.md +++ b/ebook/es/content/002-bash-structure.md @@ -4,13 +4,13 @@ Comencemos creando un nuevo archivo con extensión `.sh`. Como ejemplo, podríam Para crear ese archivo, puede usar el comando `touch`: -``bash +```bash touch devdojo.sh ``` O en vez de eso, puede usar su editor de texto: -``bash +```bash nano devdojo.sh ```