Joe Williams home
I have been working on a script the past few days and I am sort of stuck. If anyone knows anything about the 'join' command for combining two text files let me know because this thing is being a bitch and a half. There is probably a better way to do it but here's what I got: /usr/sbin/vgdisplay -v | grep '[P-V][G-V] Name' > volumelist0 awk '{print $3, $4, $5}' volumelist0 > volumelist1 ioscan -fn | awk '{print $1, $3, $4}' > diskaddr0 awk '{print $1, $2, $4}' diskaddr0 | grep 'disk' > diskaddr1 awk '{print $1, $2, $4}' diskaddr0 | grep '/dev/dsk/' > diskdir0 paste diskaddr1 diskdir0 | awk '{print $2, $3}' > diskaddr2 grep 'Active' autopath.04 | awk '{print $1}' > altlinks0 cat altlinks0 | awk -f awkcolumns > altlinks1 #split into two columns join -j1 1 -j2 2 altinks1 diskaddr2 > altlinks2 The 'join' at the end cuts the list off early and I cannot figure out why. 'altlinks2' should be a *complete list of the physical volumes, alternate links and hardware addresses. Again, if you have half a clue speak up or I may resort to Excel and Access...
Fork me on GitHub