[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
> Is there anyway to attach a document to a mail message from the command > line? I guess it would be easy for a text file: > > echo "attachment.txt" > mail username Incidentally, the above line probably doesn't do what you intended; it would place the literal string "attachment.txt" into a file named "mail", overwriting it's previous contents if it already existed. To mail a user the contents of a text file, try: mail -s "Desired subject line" username < attachment.txt -mct