sbt-idp/unset_env.sh
2024-02-21 12:46:41 +07:00

12 lines
242 B
Bash

#!/bin/bash
# Load .env file into current shell session
set -a
source .env
set +a
# Unset each variable defined in .env
while IFS= read -r line || [[ -n "$line" ]]; do
variable=$(echo "$line" | cut -d= -f1)
unset "$variable"
done < .env