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 | |
regex='^[0-9]+([.][0-9]+)?$' | |
if [[ ! $2 =~ $regex ]]; then | |
echo "Usage: createSwap.sh fullPathToSwapFile swapFileSizeinGB"; | |
echo "ex: createSwap /tmp/swapfile.swap 8" | |
exit 1 | |
fi | |
if [[ -d $1 ]] || [[ -f $1 ]] || [[ ! $1 = /* ]]; then | |
echo "please supply the full path to a new swapFile" | |
exit 1 |
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 | |
dir="apple-certificates-data" | |
if [ -d $dir ]; then | |
echo "**Este script sobrescreve os dados que estão no diretorio '$dir'!**" | |
read -r -p "Continuar? [y/N] " start | |
start=${start,,} # tolower | |
if [[ ! "$start" =~ ^(yes|y)$ ]]; then | |
exit 0 | |
fi | |
fi |
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 | |
cd /tmp || exit | |
read -r -p "[s]table or [b]eta? [sS/bB] " choice | |
choice=${choice,,} # tolower | |
if [[ ! "$choice" =~ ^(s|b)$ ]]; then | |
exit | |
fi | |
if [[ "$choice" = "s" ]]; then | |
url=https://dl.pstmn.io/download/latest/linux64 | |
name=Postman |