Would this be correct ...
ls -ltr /your/dir # This puts the files in the correct sort order.
The starting file number would be the first substr of $NF and the ending file number would be the last file shown in the listing - Correct ??
Please take a look at this and see if I am understanding you. Am I on the right track?
ls -l /your/dir | awk '{print substr($NF, index($NF,"_")+1, 4)}' | sort +0n | awk 'BEGIN {getline TMP1; while(getline TMP2 > 0) if(TMP2 > TMP1 + 1) for(i=TMP1+1; i < TMP2; i++) print i; TMP1 = TMP2}}'
Here's a way to get what you want: This is my first post, so here's hoping I do this correctly...
for name in `awk 'NF == 3 {arr1[$1,$3] += 1}; NF > 3 {arr1[$1,$4] += 1}; END {for(i in arr1) if(arr1[i] > 1) print i}' data1 data2`
do
awk -v N=$name 'BEGIN{sub(/[\034]/,"",N)}; NF==3 && $1$3...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.