Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shellscriptx/5a9ae47d3a95ec09f97f737f91024f90 to your computer and use it in GitHub Desktop.
Save shellscriptx/5a9ae47d3a95ec09f97f737f91024f90 to your computer and use it in GitHub Desktop.
#!/bin/bash

# Lê os dados fornecedidos pelo usuário.
read -p 'Usuario: ' user
read -p 'Home: ' home
read -p 'Disco: ' disk
read -p 'Tamanho ' disk_size

# Define a configuração padrão se alguma opção for omitida.
                                  # Padrão:
user=${user:-usuario1}            # usuario1
home=${home:-/home/usuario1}      # /home/usuario1
disk=${disk:-/dev/sda}            # /dev/sda
disk_size=${disk_size:-128 GB}    # 128 GB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment