• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 450
  • Last Modified:

AIX lspv output parsed from vertical to horizontal (or something to do it automatically?)

Hi,

I've got a huge PV output like this:

hdisk250        00cde241ba488198                    vg_save         active
hdisk244        00cde241ba48823c                    vg_save         active
hdisk232        00cde241ba488304                    vg_save         active
hdisk299        00cde241ba48839c                    vg_save         active
hdisk245        00cde241ba488467                    vg_save         active
hdisk211        00cde241ba48850d                    vg_save         active

And i'd like to parse it to be able to run lscfg like that:

for i in hdisk250 hdisk 244 hdisk 232; do lscfg -vl $i done;                                                      

Is this achievable? It's a lot of work to lscfg each pv.
0
g0all
Asked:
g0all
1 Solution
 
woolmilkporcCommented:
for hdisk in $(lspv | awk '{print $1}'); do lscfg -vl $hdisk; done
0
 
g0allAuthor Commented:
Brilliant.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now