To monitor the job status in clusters, qstat is used to output lines like this
job-ID prior name user state submit/start at queue slots ja-task-ID
-----------------------------------------------------------------------------------------------------------------
146767 2.75000 REMD xxxxxx Rr 03/26/2021 10:58:17 [email protected] 160
146811 2.75000 REMD xxxxxx r 03/26/2021 11:37:48 [email protected] 160
146862 2.25862 REMD xxxxxx Rq 03/26/2021 06:24:39 160
146911 2.19397 REMD xxxxxx Rq 03/26/2021 11:37:20 160
146768 0.00000 REMD xxxxxx hqw 03/13/2021 14:47:35 160
146769 0.00000 REMD xxxxxx hqw 03/13/2021 14:47:35 160
146770 0.00000 REMD xxxxxx hqw 03/13/2021 14:47:36 160
The first element of each line is the job ID. Is there a way to show the lines for a particular range of jobs, e.g. how to only show the jobs from 146868 to 146927? It seems that grep is needed.