I have an expression
ls -l `find . -type f` | tr -s [:space:] | cut -d ' ' -f 5 | sort | uniq -c | tr -s [:space:] | sort -k 2n
which creates a 2D array like:
xx yy
xx yy
xx yy
where xx is numerosity of incidence and yy is the size of the files with incidence xx. What i need is to compare every cell yy with some numbers (like if (yy < 100 B) .. if(yy < kiB) .. etc.) and according to this print '#' xx times to the right row in table. I was trying
awk '{print $1;}'
but it just takes one column and I can´t specify row like in C for example.
Is it somehow possible to do it? it must work on dash, ksh and bash.