服务器 Gind.cn
  • Linux
  • Windows
  • Ubuntu
  1. 服务器 Gind.cn
  2. bash linux unix
  3. 避免bash脚本等待用户input回车键
Intereting Posts
Tivoli Data Protection for Exchange恢复错误ACN0101E参数无效 用PowershellreplaceXML中的string会导致MALFORMED XML Kali linux源列表失败 Windows 2008:限制进程的networking带宽 如何使用bash在centos 5.8 64bit上安装imagick的最新版本 NFS – 以编程方式检测远程创build的文件? CentOS 6 iptables AWS EC2实例需要多个ENI吗? 向SQL SERVER 2008 R2中添加匿名IURS IIS用户失败 如何在Ubuntu 12.04中configuration和使用qemu-guest-agent? 我的主要目标是从主机获取访客虚拟机的IP地址 rsync / robocopy / MIR到azure Ubuntu文件服务器 – 多个用户 阻止*本地*stream量'iptables'; 但允许*远程*stream量 禁用Windows Update并手动pipe理修补程序 监测悬挂过程

避免bash脚本等待用户input回车键

我在bash脚本中input了以下内容。

echo "Please see attached file" | mailx -S smtp=$smtpServer -s "Subject of the mail" -a $logfile -r "[email protected]" [email protected] [email protected] 

它的工作正常,如果没有错误发送邮件。 但有时如果出现错误,mailx将显示错误信息并等待用户input回车键(回车)。 我想避免这一点。 它不应该等待用户input回车键。 如何在bash脚本中做到这一点?

  • Google云(GKE)Kubernetes Docker容器中的文件权限错误
  • Windows 10 Bash AWS问题ENETUNREACH 169.254.169.254:80
  • 奇怪的bash_history当stream浪的时候
  • winexec错误无法打开Windows 2012的控制pipe道
  • 在bash shell和ssh shell中加载JSON varenv
  • 条件VIA ssh的mkfs
  • Jenkins执行shell返回值命令vs文件
  • CentOS – bash版本在升级后不会改变
  • Systemd:监督进程XXXX,这不是我们的孩子。 我们很可能不会注意到什么时候退出
  • 如何使用RESP将DEL命令发送给Redis?
  • 用bash设置一个可以在.htaccess中读取的variables
  • Elasticsearch模板在重新启动后不会保留
  • 如何在n秒后创build并closuresSOCKS5隧道?
  • 无法删除常规文件“设备或资源忙”
  • 如何让连接到SFTP打开,而其他bash命令运行

  • © 2017 服务器 Gind.cn
  • Topics
  •        
  • Powered by Server
  • Privacy Policy