12 lines
242 B
Bash
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 |