Log handle

 # Define constants

DEFAULT_LOCATION="ncryption/TDE"

LOG_LOCATION="$DEFAULT_LOCATION/log"

RUN_DATE=$(date '+%Y%m%d')


# Create necessary directories if they do not exist

mkdir -p "$DEFAULT_LOCATION" "$LOG_LOCATION"


# Define log and report files

LOG_FILE="${LOG_LOCATION}/wallet_validate_${RUN_DATE}.log"

REPORT_FILE="${LOG_LOCATION}/wallet_report_${RUN_DATE}.log"


# Check if log and report files can be created

if touch "$LOG_FILE" && touch "$REPORT_FILE"; then

    echo "Log and report files initialized successfully."

else

    echo "Error: Cannot create log or report files. Check directory permissions."

    exit 1

fi

Comments

Popular posts from this blog

Database growth

P2

SQL Loader V3