[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[OT] Filtern mehrer Zeilen...



Hallo,

ich bekomme von einem Kommando folgenden Output:
----------------------------------------------------------------------
      Device #0
         Device is a Hard drive
         State                              : Online
--
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 0
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off
--
         NCQ status                         : Enabled
      Device #1
         Device is a Hard drive
         State                              : Ready
--
         FRU                                : None
         S.M.A.R.T.                         : No
         S.M.A.R.T. warnings                : 400
         Power State                        : Full rpm
         Supported Power States             : Full rpm,Powered off

Diese Ausgabe möchte ich filtern, sodass nur noch
State                              : Online
S.M.A.R.T. warnings                : 0
State                              : Ready
S.M.A.R.T. warnings                : 400

übrig bleibt und dann möchte ich die Werte der vier Zeilen auswerten.
Wie mache ich das am besten?

Gruß,
Boris


Reply to: