Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 459
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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