我對編程有點新,所以我需要幫助。期望:如何抓住輸出的一部分
這裏有一個樣本會話:
CMD> disable inactive
Accounts to be disabled are:
albert_a - UUID abcd-11-2222
brian_b - UUID bcde-22-3333
charley_c - UUID cdef-33-4444
Starting processing
...hundreds of lines of processing...
CMD> quit
Done.
我需要獲取用戶名和UUID的存在(的UUID是無法可以通過其他方式),然後要麼將它們保存到一個文件中。我該如何做到這一點?
編輯:在- UUID
(空格破折號空間「UUID」)列表的一部分是靜態的,而不是在「上百處理的行」隨處可見,所以我認爲我可以匹配對抗模式...但是如何?
而我猜你可以有任何數量的帳戶/ UUID行在輸出,正確的? – James
@James對不起,我剛剛從一個出城旅行回來......沒有時間檢查SO.com – pepoluan