I have a text file with file names, id like to have this portion of my BASH script go grab the line (which in this case is the full path to my file) then cat that file so I could pipe it to a email.
1) My text file (/tmp/1.txt) is setup like this:
1301086981.V804I56a45d6bM514265.sam.company.local
1301101622.V804I56a4662cM485737.sam.company.local
2) cat /tmp/1.txt | while read i; do echo "$i" | sendmail -t
me@company.com; done
Maybe im doing something wrong with my syntacs but it should read each line and (for example cat 1301086981.V804I56a45d6bM514265.sam.company.local | sendmail -t
me@company.com)
All that its currently doing is sending a email for every line in the text file inserting the line into the emails body.