21 lines
450 B
Bash
Executable File
21 lines
450 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Check if both arguments are provided
|
|
if [ $# -ne 2 ]; then
|
|
echo "Usage: send <to_address> <filename>"
|
|
exit 1
|
|
fi
|
|
|
|
# Assign arguments to variables
|
|
to_address=$1
|
|
filename=$2
|
|
|
|
# Change directory to /home/gemini/misfin/
|
|
cd /home/gemini/misfin/ || exit 1
|
|
|
|
# Get the content of the message from the file
|
|
message_content=$(cat "$filename")
|
|
|
|
# Run the python3 command
|
|
python3 -m misfin send-as mail_satch.pem "$to_address" "$message_content"
|