Você quer o comando uniq
.
De man uniq
:
Filter adjacent matching lines from INPUT (or standard input), writing to OUTPUT (or standard output).
With no options, matching lines are merged to the first occurrence.
Use da seguinte forma:
uniq movies.txt
Envie como desejado.