This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare -A ENTRY | |
VAR="HI EVERYBODY IM A SCRIPT BASH TO TEST PARAMETERS" | |
ENTRY[1]=$(/bin/bash -c 'echo "$1"' $VAR) | |
ENTRY[1-]=$(/bin/bash -c 'if [ $# -gt 0 ]; then echo "$@" ; fi' $VAR) | |
ENTRY[2]=$(/bin/bash -c 'echo "$2"' $VAR) | |
ENTRY[2-]=$(/bin/bash -c 'if [ $# -gt 1 ]; then echo "$(echo "$@" | cut -d " " -f2-)" ; fi' $VAR) | |
ENTRY[3]=$(/bin/bash -c 'echo "$3"' $VAR) | |
ENTRY[3-]=$(/bin/bash -c 'if [ $# -gt 2 ]; then echo "$(echo "$@" | cut -d " " -f3-)" ; fi' $VAR) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VERSION=1.10.2 | |
ICONO="icon/minecraft.svg" | |
BIN="Minecraft.jar" | |
error() { | |
echo -e "\033[1;31mError\033[0m:" | |
} | |
ok() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal | |
:: Por @otgo https://github.com/otgo | |
for /f "tokens=2 delims==" %%G in ('wmic os get Caption /value') do ( | |
if not defined VersionDeWindows set VersionDeWindows=%%G | |
) | |
:: Error si no tienes Windows 10 | |
if "x%VersionDeWindows:Windows 10=%" == "x%VersionDeWindows%" ( | |
echo No se detecto que tengas Windows 10 instalado en tu sistema | |
pause |