【发布时间】:2013-12-08 08:45:06
【问题描述】:
我正在尝试将块式记录转换为表格。该记录是有关磁盘的 AIX ODM 信息。
--------------------------------------------------------
lsattr -El hdisk2 :-
pvid 00f68614bd9b2da20000000000000000 Physical volume identifier False
q_err no Use QERR bit True
q_type simple Queue TYPE True
queue_depth 16 Queue DEPTH True
reserve_lock no Reserve Device on open True
reserve_policy single_path N/A True
rw_timeout 40 READ/WRITE time out value True
scsi_id 0x71003f SCSI ID False
start_timeout 180 START UNIT time out value True
ww_name 0x5000097208426d54 FC World Wide Name False
--------------------------------------------------------
lsattr -El hdisk3 :-
pvid 00f686145f0caa790000000000000000 Physical volume identifier False
q_err no Use QERR bit True
q_type simple Queue TYPE True
queue_depth 16 Queue DEPTH True
reserve_lock no Reserve Device on open True
reserve_policy single_path N/A True
rw_timeout 40 READ/WRITE time out value True
scsi_id 0x71003f SCSI ID False
start_timeout 180 START UNIT time out value True
ww_name 0x5000097208426d54 FC World Wide Name False
--------------------------------------------------------
所需的输出是一个列出 pvid、reserve_policy 和 ww_name 的表格,例如:
hdisk2 00f68614bd9b2da20000000000000000 single_path 5000097208426d54
hdisk3 00f686145f0caa790000000000000000 single_path 5000097208426d54
awk 或 sed 怎么做? 请帮忙。 谢谢
【问题讨论】: