10000 002-bash-structure [es] by marcelozarate · Pull Request #71 · bobbyiliev/introduction-to-bash-scripting · GitHub
[go: up one dir, main page]

Skip to content

002-bash-structure [es] #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions ebook/es/content/002-bash-structure.md
Original file line number Diff line number Diff line change
@@ -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`.
0