我想從文本文件中讀取特定值,然後使用批處理腳本在其前面打印值。從文本文件讀取一個特定的字符串,然後打印它的值
腳本應該只讀所有的「總空間」下聚合列中遇到的文本文件,然後分配上校下添加和報表中的值
不能呆子,因爲它不允許安裝任何第三方我試圖運行我的腳本的mgmt服務器上的軟件。
TEXT是這樣的......
Total space WAFL reserve Snap reserve Usable space BSR NVLOG A-SIS Smtape 13245GB 1324GB 596GB 11325GB 0GB 6GB 0GB Space allocated to volumes in the aggregate Volume Allocated Used Guarantee vol0 301GB 6GB volume groups 18GB 18GB none userdata 665GB 662GB none restricted 9GB 4GB none local 16GB 10GB none Aggregate Allocated Used Avail Total space 1011GB 701GB 10306GB Snap reserve 596GB 7GB 588GB WAFL reserve 1324GB 94GB 1230GB Total space WAFL reserve Snap reserve Usable space BSR NVLOG A-SIS Smtape 4138GB 413GB 0GB 3724GB 0GB 20GB 0GB Space allocated to volumes in the aggregate Volume Allocated Used Guarantee uservol01 706GB 701GB none deptvol02 367GB 364GB none deptvol01 837GB 834GB none Aggregate Allocated Used Avail Total space 1911GB 1900GB 1792GB Snap reserve 0GB 0GB 0GB WAFL reserve 413GB 41GB 372GB Aggregate 'aggr0' Total space WAFL reserve Snap reserve Usable space BSR NVLOG A-SIS Smtape 827GB 82GB 0GB 744GB 0GB 0GB 0GB Space allocated to volumes in the aggregate Volume Allocated Used Guarantee vol0 710GB 10GB volume Aggregate Allocated Used Avail Total space 710GB 10GB 32GB Snap reserve 0GB 1GB 0GB WAFL reserve 82GB 4GB 78GB
+1回答這個問題的原油。 – Endoro
它的作品!輸出正是我一直在尋找的。 –