- 论坛徽章:
- 0
|
在.SH文件中执行命令
/root/df -hl >> /root/syslog`date +'%Y%m%d'`.txt
/root/uptime>> /root/syslog`date +'%Y%m%d'`.txt
/root/uname-a >> /root/syslog`date +'%Y%m%d'`.txt
/root/hostname >> /root/syslog`date +'%Y%m%d'`.txt
报如下错误:
Mar 6 22:32:57 file xinetd[4113]: EXIT: rsync status=0 pid=32734 duration=3973(sec)
./syslogfilter.sh: line 6: failed: command not found
./syslogfilter.sh: line 20: /root/dh: \u6ca1\u6709\u90a3\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55
./syslogfilter.sh: line 26: /root/uptime: \u6ca1\u6709\u90a3\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55
./syslogfilter.sh: line 29: /root/uname-a: \u6ca1\u6709\u90a3\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55
./syslogfilter.sh: line 31: /root/hostname: \u6ca1\u6709\u90a3\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55
请问在.sh文件中应如何执行系统命令?
|
|