I am trying to write a loop that reads the text file and prints all the lines that is starting with (t:).the loop should print upto 200 lines that contains (t:) word to output file. the remaining words starting with (t:) should print in other output.file how to do this?
Basically what the script should do is it should not print more than 200 lines. if there more than 200 lines the remaining lines should printed in another output file.
for example
the text file contains
(t:) should print in other output.
sfsfsaff
(t:) blablabla
(t:) should print in other output.
(t:) blablalbalbalbalba
blalblabalbalbab
balbalbablaba
balbablalbalba
balbalbalbab
ablablalbab.
(t:) blablabla
(t:) blablabla
output.txt
(t:) should print in other output.
(t:) blablabla
(t:) should print in other output.
(t:) blablalbalbalbalba
(t:) blablabla
(t:) blablabla