- 论坛徽章:
- 24
|
- [root@AnsibleC14 tmp]# cat aa.py
- #!/usr/bin/python
- import os
- import sys
- File="sed -n '1,12p' 1.txt"
- File1="sed -n '13,$p' 1.txt"
- File2="sed -n '13,$p' 1.txt"
- String=""
- List1=os.popen(File1).read().strip('\r\n').split()
- List2=os.popen(File2).read().strip('\r\n').split()
- print os.popen(File).read().strip('\r\n')
- if len(List1)==len(List2) :
- i=0
- while i<len(List1) :
- x=float(List1[i])+float(List2[i])
- String=String+str(x)+" "
- i+=1
- if i%10 == 0 :
- String=String+"\n"
- print String
- [root@AnsibleC14 tmp]# ./aa.py
- VBM
- 1.00000000000000
- 3.844636 0.000000 0.000000
- 1.922318 3.329553 0.000000
- 1.922318 1.109851 3.139132
- Si
- 2
- Direct
- 0.000000 0.000000 0.000000
- 0.250000 0.250000 0.250000
- 56 56 56
- -4.8474 -4.4954 -3.4792 -1.91258 0.02979 2.1388 4.204 6.0466 7.5444 8.638
- 9.3252 9.6442 9.656 9.4292 9.0306 8.5192 7.9338 7.3002 6.6422 5.9836
- 5.345 4.7448 4.1968 3.7122 3.2998 2.968 2.724 2.5744 2.524 2.5744
- 2.724 2.968 3.2998 3.7122 4.1968 4.7448 5.345 5.9836 6.6422 7.3002
- 7.9338 8.5192 9.0306 9.4292 9.656 9.6442 9.3252 8.638 7.5444 6.0466
- 4.204 2.1388 0.02979 -1.91258 -3.4792 -4.4954 -4.4954 -3.6928 -2.1894 -0.173258
- 2.1156 4.4258 6.5376 8.2936 9.6108 10.4754 10.9238 11.0204 10.8398 10.4542
- 9.9282 9.311 8.6306 7.9112 7.1772 6.4518 5.7566 5.109 4.524 4.0132
- 3.5876 3.2568 3.03 2.9146 2.9146 3.03 3.2568 3.5876 4.0132 4.524
- 5.109 5.7566 6.4518 7.1772 7.9112 8.6306 9.311 9.9282 10.4542 10.8398
- 11.0204 10.9238 10.4754 9.6108 8.2936 6.5376 4.4258 2.1156 -0.173258 -2.1894
复制代码 |
|