这边想到了一个很简单的获取补丁模块的方法:
ls |grep ".gs" |awk -F "20" '{print $1}' | awk -F "HB" '{print $1}' |awk -F "Dev" '{print $1}' |uniq |sort |awk -F "30" '{print $2}'
还可以添加行转列 用第二个 倒数第二个 " " 里面表示分隔符
ls |grep ".gs" |awk -F "20" '{print $1}' | awk -F "HB" '{print $1}' |awk -F "Dev" '{print $1}' |uniq |sort |awk -F "30" '{print $2}' |sort |awk -F "+" '{for(i=1;i<=NF;i++) a[i,NR]=$i}END{for(i=1;i<=NF;i++) {for(j=1;j<=NR;j++) printf a[i,j] ",";print ""}}'