Help in attaching the csv sheet in alerts


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help in attaching the csv sheet in alerts
# 1  
Old 02-15-2011
Bug Help in attaching the csv sheet in alerts

Hi Experts,
An automation of Unprocessed data(oracle rows) table where a shell script is written to check if there are any records inserted into the table on daily basis. Whenever rows passed into this table on a particular day, there will be a time where the script can be scheduled around 7:00 am GMT on crontab to raise automated alerts such as Assyst ticket detailing the source row information.

1) Here got stuck up about how the output rows are attached with the automated ticket in CSV format.

2) Any correction of code, if that can be achieved in simple. thanks in advance,

Here goes my code,




Code:
# /* ----------------------- Initialisation ---------------------------- */
# /*---------------------------------------------------------------------*/
# /*------- Determine ORACLE schema for HUB
SCHEMANAME=`echo ${ENVDEF}_HUB | tr 'A-Z' 'a-z'`
fExtractInstance
# /*--------------------- Main Process
fSelectRow

Moderator's Comments:
Mod Comment
Please use code tags when posting data and code samples!

Last edited by pludi; 03-04-2011 at 07:36 AM.. Reason: code tags, please!
# 2  
Old 02-21-2011
uuencode is your friend...
Following will send two attachments...

Code:
 # Any number of files...
   
  # Make 2 files...
  echo "Greetings!!" > mb.test
  echo "Greetings Again!!" > mb.test2
   
  # Recipients etc...
  SUBJECT="TEST Multiple file attachment"
  TO_LIST="someone@somewhere.com.au"
    (
  # Send each file you need to...
  for AttFile in `ls -1 mb.test*`
  do
          uuencode $AttFile $AttFile
  done
  ) | /usr/bin/mailx -s "$SUBJECT" "$TO_LIST"


Last edited by pludi; 03-04-2011 at 07:36 AM.. Reason: code tags please
# 3  
Old 03-04-2011
Thanks Michael,

I have resolved my old issue by somehow Smilie.

Your below post is very useful.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Summing up the data from different excel sheet into one excel sheet

Hi Folks, Can you please advise for any script in unix such that for example , i have 3 different excel sheet at the location /ppt/gfr/exc so the name s of the excel sheet are 1excel.xslx 2excel.xslx 3excel.xslx now in these 3 different excel sheet there is lot of data for example each... (3 Replies)
Discussion started by: punpun66
3 Replies

2. Shell Programming and Scripting

How to add a new sheet or a new tab in a csv file?

Hi All, I woulk like thanks to all of you for your instant support. I am again in a trouble so move to here for solution. I want to add a new sheet or a new tab in a csv file means a singly csv file having two or more sheets. Please help me any help towards this should highly be appreciated. ... (3 Replies)
Discussion started by: Ashish Singhal
3 Replies

3. Shell Programming and Scripting

Perl : to get all the hyperlinks from the xlsx sheet(hyperlinks not visible in excel sheet directly)

Hi folks, I have a requirement in perl to print all the hyperlink from the spreadsheet(xlsx). Spreadsheet contains few lines of hyperlink data (pic attached). P.S. Hyperlink is behind the data and not visible in excel sheet directly. Now using perl script I need to copy the hyperlinks in... (3 Replies)
Discussion started by: scriptscript
3 Replies

4. Shell Programming and Scripting

Copy Data from CSV file to Excel Sheet using Perl

Hi All, Firstly I will like to wish A Happy New Year to all. Now my issue is I have one csv file say(data.csv) and one excel file say(result.xls) The result.xls contains two sheet name Sheet1 and Sheet2, Now What I am trying to do is to First I want to delete that data of Sheet2 if present any,... (6 Replies)
Discussion started by: adisky123
6 Replies

5. Emergency UNIX and Linux Support

Problem in attaching zone

Hi, I have installed few Veritas packages in my local zone. Prior to that, I had detached non-global zones. After successfull installation of veritas packages on global zone, I am attaching non-global zones with -u option, but stuck with one NGZ. One of the NGZ is having gsk7bas 7.0.4.38 while... (5 Replies)
Discussion started by: solaris_1977
5 Replies

6. Solaris

Help with attaching mirrors

Hi Guys, I need a help with attaching the sub mirrors as it keep throwing errors. I have done solaris live upgrade and it was succesful but it keeps throwing error only for root (s0) and swap (s1)when i try to attach them. For rest of the partitions for slices 3,4,5 on target 1 are able to... (4 Replies)
Discussion started by: phanidhar6039
4 Replies

7. Shell Programming and Scripting

Attaching two text files in two different sheet in same excel

Hi, My requirement is to get attach two different text file contents to two different sheets in same excelsheet. Also, is there any way we can name the tabs as desired ? Kindly assist. (2 Replies)
Discussion started by: sanjaydubey2006
2 Replies

8. Shell Programming and Scripting

mail a csv file as an excel sheet!

Hi, The result of a script is a csv file in the following format: cat $file_name DATA_USAGE_FACT,YES_NO_FLG,TARGET_TABLE,YES_NO_FLG,1,0,15,0 DATA_USAGE_FACT,DATE_OF_CREATION,TARGET_TABLE,DATE_OF_CREATION,29,9,19,0 DATA_USAGE_FACT,UPDATION_DATE,TARGET_TABLE,UPDATION_DATE,29,9,19,0... (3 Replies)
Discussion started by: dips_ag
3 Replies

9. Shell Programming and Scripting

Attaching .csv file and sending email

I need help with writing a shell script for writing data from a table into a .csv file and send the file has email attachment. I stuck up with attaching the file to the email. Thanks, (1 Reply)
Discussion started by: Beena
1 Replies

10. UNIX for Advanced & Expert Users

Insert csv into special sheet of excel

Hi, I need a script that can insert csv file into the special sheet of excel (other sheets in this excel include charts which use data of the special sheet). Could you help me please? (2 Replies)
Discussion started by: Elena
2 Replies
Login or Register to Ask a Question