Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Sending Email in Excel Format Post 302995859 by Booo on Thursday 13th of April 2017 05:30:28 PM
Old 04-13-2017
Code:
$ cat test
2017/01/01 a 10
2017/01/01 b 20
2017/01/01 c 40
2017/01/01 a 60
2017/01/01 b 50
2017/01/01 c 40
$echo | mailx  -s "Test Email" -a test xyz@xyz.com


Moderator's Comments:
Mod Comment SERIOUSLY: Please use CODE tags as required by forum rules!

Last edited by RudiC; 04-13-2017 at 06:35 PM.. Reason: Added CODE tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem sending excel attachments with MIME::Lite in perl

I am running a perl script that generates an excel doc and then emails it as an attachment. I can generate the excel file fine. I can scp it from the box and open it with no problems. When I send it over email, the file does open properly. The file in email is only 288 B, but on the server it is... (1 Reply)
Discussion started by: Mike_the_Man
1 Replies

2. Shell Programming and Scripting

Sending SQL Queries output to different Excel sheets

Hi, I need your help in sedning sql queries output to different excel sheets. My requirement is like this: Query1: Select name from table1 where status = 'Complete' Query2: Select name from table1 where status = 'Failed' Query3: Select name from table1 where status = 'Ignored' ... (4 Replies)
Discussion started by: parvathi_rd
4 Replies

3. UNIX for Dummies Questions & Answers

Changing from Excel date format to MySQL date format

I have a list of dates in the following format: mm/dd/yyyy and want to change these to the MySQL standard format: yyyy-mm-dd. The dates in the original file may or may not be zero padded, so April is sometimes "04" and other times simply "4". This is what I use to change the format: sed -i '' -e... (2 Replies)
Discussion started by: figaro
2 Replies

4. Shell Programming and Scripting

Retaining the Unix CSV format in Excel format while exporting

Hi All, I have created a Unix Shell script whch creates a *.csv file and export it to Excel. The problem i am facing is that Users wants one of the AMOUNT field in comma separted values. Example : if the Amount has the value as 3000000 User wants to be in 3,000,000 format. This Amount format... (2 Replies)
Discussion started by: rawat_me01
2 Replies

5. Shell Programming and Scripting

Using top command to email if process is exceeding 25% and sending an email alert if so

This is my first time writing a script and Im having some trouble, Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage I tried grep Obviosly that hasnt worked, Any... (8 Replies)
Discussion started by: jay02
8 Replies

6. Shell Programming and Scripting

mailx not sending excel attachment properly

Hi, I am trying to send email with attachment using mailx command. I am using the folowing command: uuencode XX_HWSW_BUYERWISE_88963631_1.xls XX_HWSW_BUYERWISE_88963631_1.xls | mailx -s "Test Mail as Attachment" oracleams@xyz.com I get the email in the inbox. However, when I try to open the... (5 Replies)
Discussion started by: asp_julius
5 Replies

7. Shell Programming and Scripting

Format Excel sheet

Hi, I want to format Excel sheet through Unix script. Format would mean bolding the data in the cell, adding clor to it etc. Please help me if it is possible through Unix scripting? Thanks, Durga (2 Replies)
Discussion started by: Durga Prasad NK
2 Replies

8. Shell Programming and Scripting

Script to generate Excel file or to SQL output data to Excel format/tabular format

Hi , i am generating some data by firing sql query with connecting to the database by my solaris box. The below one should be the header line of my excel ,here its coming in separate row. TO_CHAR(C. CURR_EMP_NO ---------- --------------- LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies

9. Shell Programming and Scripting

Body content is in random format while sending email from Linux to my outlook.

Hi I have a script running in lunix machine which emails log file content to my outlook. Here is the actual log file result: Image-1 In-Master:25028 ReplicaDn Consumer Supplier Delay dc=xxx,dc=com lmjker0110:12345 ... (4 Replies)
Discussion started by: buzzme
4 Replies

10. UNIX for Beginners Questions & Answers

Sending Excel Files as attachment using Mail

Hie, I need to attach an .xlsx file as an attachment to a mail. I have used the mail option but i dont think there is anything for attachment. Can you show me how else can i do it? I am not allowed to install mutt since it is a workplace and they have their restrictions. And its a Bash Shell (2 Replies)
Discussion started by: barryallen
2 Replies
Data::OptList(3)					User Contributed Perl Documentation					  Data::OptList(3)

NAME
Data::OptList - parse and validate simple name/value option pairs VERSION
version 0.109 SYNOPSIS
use Data::OptList; my $options = Data::OptList::mkopt([ qw(key1 key2 key3 key4), key5 => { ... }, key6 => [ ... ], key7 => sub { ... }, key8 => { ... }, key8 => [ ... ], ]); ...is the same thing, more or less, as: my $options = [ [ key1 => undef, ], [ key2 => undef, ], [ key3 => undef, ], [ key4 => undef, ], [ key5 => { ... }, ], [ key6 => [ ... ], ], [ key7 => sub { ... }, ], [ key8 => { ... }, ], [ key8 => [ ... ], ], ]); DESCRIPTION
Hashes are great for storing named data, but if you want more than one entry for a name, you have to use a list of pairs. Even then, this is really boring to write: $values = [ foo => undef, bar => undef, baz => undef, xyz => { ... }, ]; Just look at all those undefs! Don't worry, we can get rid of those: $values = [ map { $_ => undef } qw(foo bar baz), xyz => { ... }, ]; Aaaauuugh! We've saved a little typing, but now it requires thought to read, and thinking is even worse than typing... and it's got a bug! It looked right, didn't it? Well, the "xyz => { ... }" gets consumed by the map, and we don't get the data we wanted. With Data::OptList, you can do this instead: $values = Data::OptList::mkopt([ qw(foo bar baz), xyz => { ... }, ]); This works by assuming that any defined scalar is a name and any reference following a name is its value. FUNCTIONS
mkopt my $opt_list = Data::OptList::mkopt($input, \%arg); Valid arguments are: moniker - a word used in errors to describe the opt list; encouraged require_unique - if true, no name may appear more than once must_be - types to which opt list values are limited (described below) name_test - a coderef used to test whether a value can be a name (described below, but you probably don't want this) This produces an array of arrays; the inner arrays are name/value pairs. Values will be either "undef" or a reference. Positional parameters may be used for compatibility with the old "mkopt" interface: my $opt_list = Data::OptList::mkopt($input, $moniker, $req_uni, $must_be); Valid values for $input: undef -> [] hashref -> [ [ key1 => value1 ] ... ] # non-ref values become undef arrayref -> every name followed by a non-name becomes a pair: [ name => ref ] every name followed by undef becomes a pair: [ name => undef ] otherwise, it becomes [ name => undef ] like so: [ "a", "b", [ 1, 2 ] ] -> [ [ a => undef ], [ b => [ 1, 2 ] ] ] By default, a name is any defined non-reference. The "name_test" parameter can be a code ref that tests whether the argument passed it is a name or not. This should be used rarely. Interactions between "require_unique" and "name_test" are not yet particularly elegant, as "require_unique" just tests string equality. This may change. The "must_be" parameter is either a scalar or array of scalars; it defines what kind(s) of refs may be values. If an invalid value is found, an exception is thrown. If no value is passed for this argument, any reference is valid. If "must_be" specifies that values must be CODE, HASH, ARRAY, or SCALAR, then Params::Util is used to check whether the given value can provide that interface. Otherwise, it checks that the given value is an object of the kind. In other words: [ qw(SCALAR HASH Object::Known) ] Means: _SCALAR0($value) or _HASH($value) or _INSTANCE($value, 'Object::Known') mkopt_hash my $opt_hash = Data::OptList::mkopt_hash($input, $moniker, $must_be); Given valid "mkopt" input, this routine returns a reference to a hash. It will throw an exception if any name has more than one value. EXPORTS
Both "mkopt" and "mkopt_hash" may be exported on request. AUTHOR
Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2006 by Ricardo Signes. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.18.2 2013-12-13 Data::OptList(3)
All times are GMT -4. The time now is 06:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy