'Uniq' Command #4, is a HackerRank problem from Text Processing subdomain. In this post we will see how we can solve this challenge in Sh

Problem Description

Given a text file, display only those lines which are not followed or preceded by identical replications. Sample Input

A00 a00 01 01 00 00 02 02 A00 03 aa aa aa

Sample Output

A00 a00 A00 03


The comparison is case sensitive, so the first instance of "A00" and "a00" are considered dif ....

You can find the full details of the problem 'Uniq' Command #4 at HackerRank

Solution: Please check the the-uniq-command-4.sh snippet for the solution.

This solution originally posted at: Github by @srgnk