Solved

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

Posted on 2013-05-29
2
437 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

789 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