I'm new to bash, only been doing it a day or so, but having some trouble with one thing. I am trying to create a script that checks for updates, places them into a file, slightly formats them, then emails them. It's the latter I'm having trouble with, I have copied an email tutorial and doesnt want to work. Here is my code

#!/bin/bash
vzupdate -m batch list > maybe.txt
grep 3 maybe.txt > maybe2.txt

subject="subject"
email="barron@line3.co.uk"
emailmessage="maybe2.txt"
echo"email:">$emailmessage

/bin/mail -s "$subject" "$email"<$emailmessage

Any help would be great, cheers

Any help please?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.