We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Apply
  • Hiring developers?
  1. Prepare
  2. Linux Shell
  3. Text Processing
  4. 'Uniq' Command #1

'Uniq' Command #1

Problem
Submissions
Leaderboard
Discussions
Editorial
Tutorial

In this challenge, we practice using the uniq command to eliminate consecutive repetitions of a line when a text file is piped through it.

Given a text file, remove the consecutive repetitions of any line.

Sample Input

00
00
01
01
00
00
02
02

Sample Output

00
01
00
02  

Author

PRASHANTB1984

Difficulty

Easy

Max Score

1

Submitted By

25881

Need Help?


View tutorial
View discussions
View editorial
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy