简体   繁体   English

如何在 unix shell 脚本中包含带有 uuencode 的列标题

[英]How to include column header with uuencode in unix shell scripting

Im using uuencode in unix shell scripting but im unable to get the Column header included in the extraction in email.我在 unix shell 脚本中使用 uuencode,但我无法获取电子邮件中提取中包含的列标题。

file1.csv Col1 col2 file1.csv Col1 col2

  1. Meghan梅根
  2. Sarah

Command I have used: (Cat emailbody.txt; uuencode file1.csv file1.csv) |我使用过的命令:(Cat emailbody.txt; uuencode file1.csv file1.csv) | mailx -s "subject" email@.com mailx -s "主题" email@.com

Attachment in email.电子邮件中的附件。

  1. Meghan梅根
  2. Sarah莎拉

I need the Col1 and Col2 column header as well我还需要 Col1 和 Col2 列标题

The solution is to add header to the sql output is ie, add SET HEADER ON.解决办法是在sql输出中添加header,即添加SET HEADER ON。 SET PAGESIZE 500000 to your .sql file.将 PAGESIZE 500000 设置为您的 .sql 文件。 you can set pagesize to the max number based on your output.您可以根据输出将 pagesize 设置为最大数量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM