i have a script i am wiriting for my team, and I want it to send an email with attachment when it is done to whoever ran the script.
i already caught the user name and email with
whoami | read WHO
EMAIL="$WHO"@domain.com
but now I want to dynamicly create a file to attach to the mail, basically I just want to list variables in the file like below
variable 1 name: $1
variable 2 name: $2
How can I write that file and then send it out using mailx?