Hi,
I would like to parse the next output of an lvdisplay -v using awk:
--- Logical volumes ---
LV Name /dev/vg01/lvol3
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule striped
LV Size (Mbytes) 368640
Current LE 23040
Allocated PE 23040
Stripes 4
Stripe Size (Kbytes) 1024
Bad block NONE
Allocation strict
IO Timeout (Seconds) default
--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c9t0d5 5738 5738
/dev/dsk/c9t0d6 5738 5738
/dev/dsk/c9t0d7 5738 5738
/dev/dsk/c9t1d0 5738 5738
/dev/dsk/c9t1d1 22 22
/dev/dsk/c9t1d2 22 22
/dev/dsk/c9t1d3 22 22
/dev/dsk/c9t1d4 22 22
--- Logical extents ---
LE PV1 PE1 Status 1
00000 /dev/dsk/c9t0d5 00000 current
00001 /dev/dsk/c9t0d6 00000 current
00002 /dev/dsk/c9t0d7 00000 current
00003 /dev/dsk/c9t1d0 00000 current
00004 /dev/dsk/c9t0d5 00001 current
[...]
[...]
[...]
I would like to obtain the text marked in bold. I tried to get it using RS="---" of awk but I don't know how to obtain only X record..
Any comments is apreciated.
Thanks