How to include column header with uuencode in unix shell scripting

137 Views Asked by At

Im using uuencode in unix shell scripting but im unable to get the Column header included in the extraction in email.

file1.csv Col1 col2

  1. Meghan
  2. Sarah
    

Command I have used: (Cat emailbody.txt; uuencode file1.csv file1.csv) | mailx -s "subject" [email protected]

Attachment in email.

  1. Meghan
  2. Sarah

I need the Col1 and Col2 column header as well

1

There are 1 best solutions below

0
melony_r On

The solution is to add header to the SQL output is i.e., add SET HEADER ON ,SET PAGESIZE 500000 to your .sql file. you can set pagesize to the max number based on your output.