- 论坛徽章:
- 0
|
我用shell脚本直接运行系统会自动排版
如:
PING xxx.xxx.xx.xx (192.168.xx.xx) 56(84) bytes of data.
64 bytes from xxx.xxx.xx.xx (192.168.xx.xx): icmp_seq=0 ttl=123 time=41.8 ms
64 bytes from xxx.xxx.xx.xx (192.168.xx.xx): icmp_seq=1 ttl=123 time=38.5 ms
64 bytes from xxx.xxx.xx.xx (192.168.xx.xx): icmp_seq=2 ttl=123 time=38.4 ms
64 bytes from xxx.xxx.xx.xx (192.168.xx.xx): icmp_seq=3 ttl=123 time=38.7 ms
64 bytes from xxx.xxx.xx.xx (192.168.xx.xx): icmp_seq=4 ttl=123 time=38.4 ms
64 bytes from xxx.xxx.xx.xx (192.168.xx.xx): icmp_seq=5 ttl=123 time=38.7 ms
但是在apache+cgi里运行结果:
PING xxx.xxx.xx.xx (192.168.xx.xx): 56(84) bytes of data. 64 bytes from xxx.xxx.xx.xx (192.168.xx.xx): icmp_seq=0 ttl=122 time=62.5 ms 64 bytes from xxx.xxx.xx.xx (192.168.xx.xx): icmp_seq=1 ttl=122 time=41.4 ms 64 bytes from xxx.xxx.xx.xx (192.168.xx.xx): icmp_seq=2 ttl=122 time=38.6 ms From 192.168.*.***: icmp_seq=3 Redirect Network(New nexthop: 192.168.10.***) 64 bytes from xxx.xxx.xx.xx (192.168.xx.xx): icmp_seq=3 ttl=122 time=38.5 ms From 192.168.10.***: icmp_seq=4 Redirect Network(New nexthop: 192.168.10.***) 64 bytes from xxx.xxx.xx.xx (192.168.xx.xx): icmp_seq=4 ttl=122 time=38.4 ms 64 bytes from xxx.xxx.xx.xx (192.168.xx.xx): icmp_seq=5 ttl=122 time=38.4 ms --- xxx.xxx.xx.xx (192.168.xx.xx): ping statistics --- 6 packets transmitted, 6 received, 0% packet loss, time 5006ms rtt min/avg/max/mdev = 38.416/43.010/62.518/8.794 ms, pipe 2
请问有什么好方法吗,好像也不能添加换行符号(单独的文本文字可以换行,系统命令执行结果如何换行?) |
|