#!/bin/bash if [ -z "$1" ] || [ -z "$2" ]; then echo "Use: $0 ENV_FILE VARIABLE_NAME (VALUE)" exit 1 fi ENV_FILE=$1 VARIABLE_NAME=$2 # Password gen: 20chars,0-9,a-z generate_random_password() { #tr -dc 'a-z0-9' > "$ENV_FILE" fi trap - ERR echo "Variable $VARIABLE_NAME successfully updated/added to $ENV_FILE"