Solved

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

Posted on 2013-05-29
2
429 Views
Last Modified: 2013-05-29
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
Comment
Question by:g0all
2 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 39205575
for hdisk in $(lspv | awk '{print $1}'); do lscfg -vl $hdisk; done
0
 
LVL 1

Author Closing Comment

by:g0all
ID: 39205582
Brilliant.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now