This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Awk Array Loop translation

While working on a HP UX storage migration project, I found an awk statement as following

ioscan -funNCdisk | \
awk '{a[NR]=$0} $0~s {f[NR]++} END {for (j=1;j<=NR;j++) if (f[j]) for (i=j+C;i<=j+C;i++) \
print a[i]}' C=1 s="NetApp"

It appears it prints out the lines that match "NetApp" and some more lines related to that keyword.

Could anyone tell me to understand what this statement means?

Thank you

Parents Reply Children
No Data