Basic Bash Help?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ezb
    New Member
    • Jul 2007
    • 9

    Basic Bash Help?

    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, I know its not the most efficent but it's actuly the first script I've done. sure it's something simple that I cant see but hoping someone else would know

    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
Working...