为什么正确的shell脚本会提供包装/截断/损坏的错误消息?
$ ls -l myfile-rw-r----- 1 me me 0 Aug 7 12:36 myfile $ cat myscript ls -l myfile $ bash myscript: No such file or directory
$ ls -l idontexist ls: cannot access idontexist: No such file or directory
ls
mysql
Command: mysql -h myhost.example.comExpected: ERROR 2005 (HY000): Unknown MySQL server host 'myhost.example.com' (0)Actual: ' (0) 2005 (HY000): Unknown MySQL server host 'myhost.example.com
Command: ssh myhostExpected: ssh: Could not resolve hostname myhost: Name or service not knownActual: : Name or service not knownname myhost
相关分类