I'm trying to run:
cat s_f_d_TMT161023_1306.fits.coo.1 | sed -e '/^#/d'| sort -n -k 3 | head -n 50 >> inputcoo2.list
cat s_f_d_TMT161023_1307.fits.coo.1 | sed -e '/^#/d'| sort -n -k 3 | head -n 50 >> inputcoo3.list
and so on.
The last four characters on which I'm using the
cat varies from 1305 and goes till 1440. I also want the name of the output be increased by one like
inputcoo4.list and so on.
I can guess that I must run some kind of loop, but I'm new to bash and don't have any idea on how to implement it.
How do I go about it?