- 论坛徽章:
- 32
|
排好序的:- [root@localhost ~]# awk -F ': ' '/host device/{split($2,a,"[()]");b[a[1]]=a[2]}END{for(i=1;i<=asorti(b,c);i++)printf "multipath {\n\twwid\t%s\n\talias\t%s\n}\n",c[i],b[c[i]]}' i
- multipath {
- wwid iqbackup1
- alias 360a9800044336d696b2b446834306943
- }
- multipath {
- wwid iqbackup2
- alias 360a9800044336d696c3f4467764f3773
- }
- multipath {
- wwid iqdata1
- alias 360a9800044336d696b2b446834306933
- }
- multipath {
- wwid iqdata2
- alias 360a9800044336d696c3f4467764f3830
- }
- multipath {
- wwid iqlocaltemp2
- alias 360a9800044336d696c3f4467764f3777
- }
- multipath {
- wwid iqsharetemp1
- alias 360a9800044336d696b2b446834306935
- }
- multipath {
- wwid iqsharetemp2
- alias 360a9800044336d696c3f4467764f3779
- }
- multipath {
- wwid iqsharetemp3
- alias 360a9800044336d696b2b446834306937
- }
- [root@localhost ~]#
复制代码 |
|