diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 2605d83..db63092 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -4,20 +4,39 @@ "type": "split", "children": [ { - "id": "970bc93cb9e76d14", + "id": "a4945c2f40dfd230", "type": "tabs", "children": [ { - "id": "51283a1bd175637d", + "id": "ec35ad1ba6900d85", "type": "leaf", "state": { - "type": "empty", - "state": {}, + "type": "split-diff-view", + "state": { + "aFile": ".obsidian/workspace.json", + "bFile": ".obsidian/workspace.json", + "aRef": "" + }, + "icon": "diff", + "title": "Diff: workspace.json" + } + }, + { + "id": "cfc8c132370ad11d", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "conflict-files-obsidian-git.md", + "mode": "source", + "source": false + }, "icon": "lucide-file", - "title": "Nueva pestaña" + "title": "conflict-files-obsidian-git" } } - ] + ], + "currentTab": 1 } ], "direction": "vertical" @@ -216,8 +235,9 @@ "obsidian-git:Open Git source control": false } }, - "active": "51283a1bd175637d", + "active": "cfc8c132370ad11d", "lastOpenFiles": [ + "conflict-files-obsidian-git.md", "Servidores/M5/Actividades/RA2/RA2 \"Instal·la programari de propòsit general avaluant-ne lescaracterístiques i els entorns d’aplicació. Instal·lació de programarid’utilitat i propòsit general per a un sistema informàtic\".md", "Servidores/M5/Actividades", "README.md", diff --git a/Documentación personal/Mecanica de Unix/1. Bash Scripting Avanzado/Funciones puras/Ejercicios/Ejercicios - Funciones puras.md b/Documentación personal/Mecanica de Unix/1. Bash Scripting Avanzado/Funciones puras/Ejercicios/Ejercicios - Funciones puras.md index 0484dd4..9926c1a 100644 --- a/Documentación personal/Mecanica de Unix/1. Bash Scripting Avanzado/Funciones puras/Ejercicios/Ejercicios - Funciones puras.md +++ b/Documentación personal/Mecanica de Unix/1. Bash Scripting Avanzado/Funciones puras/Ejercicios/Ejercicios - Funciones puras.md @@ -6,6 +6,7 @@ Proveniente de [[Funciones puras]] # 1. Calculadora modular Objetivo: Separación de lógica (pura) del I/O (impuro). + + Bibliografia Web: -- [Manejo de errores en Bash Scripting](https://adictosalinux.com/manejo-errores-scripts-bash/) -- \ No newline at end of file +- [Manejo de errores en Bash Scripting](https://adictosalinux.com/manejo-errores-scripts-bash/) \ No newline at end of file diff --git a/Documentación personal/Mecanica de Unix/1. Bash Scripting Avanzado/Funciones puras/Ejercicios/calculadora_modular.sh b/Documentación personal/Mecanica de Unix/1. Bash Scripting Avanzado/Funciones puras/Ejercicios/calculadora_modular.sh index 1d0a5c1..f282e71 100755 --- a/Documentación personal/Mecanica de Unix/1. Bash Scripting Avanzado/Funciones puras/Ejercicios/calculadora_modular.sh +++ b/Documentación personal/Mecanica de Unix/1. Bash Scripting Avanzado/Funciones puras/Ejercicios/calculadora_modular.sh @@ -1,22 +1,34 @@ #!/bin/bash + +echo "Opciones posibles:" +echo "1. Sumar" +echo "2. Restar" +echo "3. Multiplicacion" +echo "4. Division" +read input +case $input in + 1) $suma;; + 2) $resta;; + 3) $multiplicacion;; + 4) $division;; +esac + + suma() { local num1=$1 local num2=$2 - local resultado=$(( $num1 + $num2)) echo $(( $1 + $2)) } resta() { local num1=$1 local num2=$2 - local resultado=$(( $num1 - $num2)) echo $(( $1 - $2)) } multiplicacion() { local num1=$1 local num2=$2 - local resultado=$(( $num1 * $num2)) echo $(( $1 * $2)) } @@ -27,6 +39,6 @@ division() { echo "ERROR_DIV_0" return 1 fi - echo $(( $1 / $2)) -} \ No newline at end of file +} + diff --git a/conflict-files-obsidian-git.md b/conflict-files-obsidian-git.md new file mode 100644 index 0000000..d8bbd4f --- /dev/null +++ b/conflict-files-obsidian-git.md @@ -0,0 +1,17 @@ +# Conflicts +Please resolve them and commit them using the commands `Git: Commit all changes` followed by `Git: Push` +(This file will automatically be deleted before commit) +[[#Additional Instructions]] available below file list + +- Not a file: .obsidian/workspace.json + +# Additional Instructions +I strongly recommend to use "Source mode" for viewing the conflicted files. For simple conflicts, in each file listed above replace every occurrence of the following text blocks with the desired text. + +```diff +<<<<<<< HEAD + File changes in local repository +======= + File changes in remote repository +>>>>>>> origin/main +``` \ No newline at end of file