Shell 在unix脚本中发送带有附件的电子邮件无法发送附件中的数据

Shell 在unix脚本中发送带有附件的电子邮件无法发送附件中的数据,shell,unix,Shell,Unix,我尝试使用unix脚本在电子邮件中发送一些附件。我可以发送带有附件的电子邮件,但附件不包含任何数据 #!/bin/csh mailx -s "Sample attachment email" <<EOF `uuencode myfile.txt` EOF #/bin/csh mailx-s“示例附件电子邮件”您应该使用uuencode定义退出状态;0(退出成功), 1(退出故障) #/bin/csh mailx-s“示例附件电子邮件”root@localhost您应该使用uuenc

我尝试使用unix脚本在电子邮件中发送一些附件。我可以发送带有附件的电子邮件,但附件不包含任何数据

#!/bin/csh
mailx -s "Sample attachment email" <<EOF
`uuencode myfile.txt`
EOF
#/bin/csh

mailx-s“示例附件电子邮件”您应该使用uuencode定义退出状态;0(退出成功), 1(退出故障)

#/bin/csh

mailx-s“示例附件电子邮件”root@localhost您应该使用uuencode定义退出状态;0(退出成功), 1(退出故障)

#/bin/csh
mailx-s“示例附件电子邮件”root@localhost
#!/bin/csh
mailx -s "Sample attachment email" root@localhost <<EOF
`uuencode myfile.txt 0`
EOF