Solved

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

Posted on 2013-05-29
2
444 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

696 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