Testing Start/Length
Testing Start/Length
- awk -f grab.awk filea
- 14 6: cbt0515s.par[495316]: valid size (will process)!
- 14 7: cme0515s.par[2044020]: valid size (will process)!
- 14 6: lif0515s.par[221548]: valid size (will process)!
- 16 6: lifee0515s.par[581755]: valid size (will process)!
- 14 6: smx0515s.par[276660]: valid size (will process)!
- Need to match lines starting with cme, cbt, lif, and smx
- This awk script prints out
- starting point and length of the string of numbers of the file byte size
- followed by a colon character and space
- and then the entire record matched
/^(cme|cbt|lif|smx)/ {
# Would Rather Have A RE of: [0-9]\{5,\}
start_point=match($0,"[0-9][0-9][0-9][0-9][0-9]+")
print RSTART, RLENGTH ": " $0
}