Sponsored Content
Top Forums Shell Programming and Scripting Addition to Bash shell script that emails final output as attachement? Post 302738179 by Twinklefingers on Friday 30th of November 2012 01:12:07 PM
Old 11-30-2012
We do have mutt, and I was able to find the PATH and export it in the shell script. Still not working for some reason. This is what I have:

Code:
#!/bin/bash

export PATH=$PATH:/usr/bin/mutt

#Email txt file

mutt -a results.txt -s "results.txt"  twinklefingers@mymail.com 

echo done
date

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Final Output

Hi There, I am having two output files having the following information: Output1: Name1 0 Name2 222 Name3 598 Name4 9800 Output2: Name1 10 Name2 333 Name3 567 Name4 39003 as you can see the two output files have the same Name colom but different records for each name. Now, how... (4 Replies)
Discussion started by: charbel
4 Replies

2. UNIX for Dummies Questions & Answers

addition in sh shell

I have to create un counter and I am unable to do an additition: #!/bin/sh count=$1 while ] do echo $count $count=$count+$1 done (1 Reply)
Discussion started by: cfg
1 Replies

3. Shell Programming and Scripting

how to direct scp output to a file in bash shell or script

I can run this from the command line: scp -i identfile /path/file_to_send remotelogin@remotebox:/path_to_put_it/file_to_send and I get: file_to_send 100% |***************************************************************************| 0 00:00 but if I do: scp -i identfile... (6 Replies)
Discussion started by: NewSolarisAdmin
6 Replies

4. Shell Programming and Scripting

How to use catch, try and final in bash script

Hi Everyone, How to use catch, try and final in bash script? what is (SQLException e) and (IOException e), who to conver this 2 function to bash script? Thank you (8 Replies)
Discussion started by: ryanW
8 Replies

5. UNIX for Dummies Questions & Answers

How do i tell my bash shell script to test the output of a command against something

How do i tell my bash shell script to test the output of the command i'm using?? I want this script to look for lines not equal to 1 then let me know.. $ cat blah ; echo ---- ; cat blah.sh 1 fe 1 fi 1 fo 0 fum 1 blahda 1 blah 0 blahh 1 bla 1 bl 1 blahhh ---- #!/bin/bash while... (1 Reply)
Discussion started by: phpfreak
1 Replies

6. Shell Programming and Scripting

Bash Decimal Addition using bc

Hi guys/gals i have a quick question. I am trying to read from a file and add the values up but the problem is the values are not integers their floats so i tried to used bc but failed epicly lol. Any tips would be great. Thanks this is the code i have so far : while read num do ... (6 Replies)
Discussion started by: vb615
6 Replies

7. Shell Programming and Scripting

Need help on addition in shell

i need shell script to add to numbers #!/usr/bin/sh a=1310601600 ------> epcho time of Thu, 14 Jul 2011 00:00:00 UTC b=864000 -------> 10 days in sec c=`expr $a+$b` echo $c----1311465600> this output i will use this value to delete the data from MySQL db next i need to set... (3 Replies)
Discussion started by: sreedhargouda
3 Replies

8. Shell Programming and Scripting

Different behavior between bash shell and bash script for cmd

So I'm trying to pass certain json elements as env vars and use them later on in a script. Sample json: JSON='{ "Element1": "file-123456", "Element2": "Name, of, company written in, a very weird way", "Element3": "path/to/some/file.txt", }' (part of the) script: for s... (5 Replies)
Discussion started by: da1
5 Replies

9. UNIX for Beginners Questions & Answers

In Bash shell - the ps -ef shows only the /bin/bash but the script name is not displayed

In Bash shell - the ps -ef shows only the /bin/bash but the script name is not displayed ? Is there any way to get the script names for the process command ? --- Post updated at 08:39 AM --- in KSH (Korn Shell), my command output shows the script names but when run in the Bash Shell... (3 Replies)
Discussion started by: i4ismail
3 Replies
MU-CFIND(1)                                                   General Commands Manual                                                  MU-CFIND(1)

NAME
mu_cfind - find contacts in the mu database and export them for use in other programs. SYNOPSIS
mu cfind [options] [<pattern>] DESCRIPTION
mu cfind is the mu command for finding contacts (name and e-mail address of people who were either sender or receiver of mail). There are different output formats available, for importing the contacts into other programs. SEARCHING CONTACTS
When you index your messages (see mu index), mu creates a list of unique e-mail addresses found and the accompanying name. In case the same e-mail address is used with different names, the most recent non-empty name is used. mu cfind starts a search for contacts that match a regular expression. For example: $ mu cfind '@gmail.com' would find all contacts with a gmail-address, while $ mu cfind Mary would find all contact with Mary in either name or e-mail address. If you do not specify any search expression, mu cfind will return the full list of contacts. The regular expressions are Perl-compatible (as per the PCRE-library). OPTIONS
--format=plain|mutt-alias|mutt-ab|wl|org-contact|bbdb|csv sets the output format to the given value. The following are available: | --format= | description | |-------------+-----------------------------------| | plain | default, simple list | | mutt-alias | mutt alias-format | | mutt-ab | mutt external address book format | | wl | wanderlust addressbook format | | org-contact | org-mode org-contact format | | bbdb | BBDB format | | csv | comma-separated values | RETURN VALUE
mu cfind returns 0 upon successful completion -- that is, at least one contact was found. Anything else leads to a non-zero return value, for example: | code | meaning | |------+--------------------------------| | 0 | ok | | 1 | general error | | 2 | no matches (for 'mu cfind') | INTEGRATION WITH MUTT
You can use mu cfind as an external address book server for mutt. For this to work, add the following to your muttrc: set query_command = "mu cfind --format=mutt-ab '%s'" Now, in mutt, you can easily search for e-mail address using the query-command, which is (by default) accessible by pressing Q. ENCODING
mu cfind output is encoded according to the current locale except for --format=bbdb. This is hard-coded to UTF-8, and as such specified in the output-file, so emacs/bbdb can handle it correctly without guessing. BUGS
Please report bugs if you find them at http://code.google.com/p/mu0/issues/list. AUTHOR
Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> SEE ALSO
mu(1) mu-index(1) mu-find(1) pcrepattern(3) User Manuals May 2011 MU-CFIND(1)
All times are GMT -4. The time now is 02:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy