I am new to unix and would like to be able to do the following, but don't know how to do this.
Take a text file with lines such as:
TR=P567;dir=o;day=su;TI=12:10;stn=westborough;Line=worcester TR=P567;dir=o;day=su;TI=12:10;stn=westborough;Line=lowell TR=P567;dir=o;day=su;TI=12:10;stn=westborough;Line=worcester TR=P234;dir=o;day=su;TI=12:10;stn=westborough;Line=lowell TR=P234;dir=o;day=su;TI=12:10;stn=westborough;Line=lowell TR=P234;dir=o;day=su;TI=12:10;stn=westborough;Line=worcester
And print this:
TR=P567;dir=o;day=su;TI=12:10;stn=westborough;Line=worcester TR=P567;dir=o;day=su;TI=12:10;stn=westborough;Line=lowell TR=P234;dir=o;day=su;TI=12:10;stn=westborough;Line=lowell TR=P234;dir=o;day=su;TI=12:10;stn=westborough;Line=worcester
I would like the script to be able to find all the lines for each TR value that have a unique Line value.
thanks
source share