Skip to content

Commit c63d24a

Browse files
committed
readme md updated and uniq practices
1 parent e76abcb commit c63d24a

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,10 @@ I will be sharing in this repository Hackerrank questions solutions and various
2121
9. Arithmetic Operations
2222
10. Comptute the Avarage
2323
11. Fractal Trees (@ copyright)
24+
12. Cut 1 to 9
25+
13. Head of text file
26+
14. Middle of text file
27+
15. Tail of text file
28+
16. Tr 1 to 3
29+
17. Sort 1 to 7
30+
18. Uniq 1 to 4

hackerrank_practices/36_uniq_2.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# In this challenge, we practice using the uniq command to eliminate consecutive repetitions of a line when a text file is piped through it.
2+
3+
uniq -c | cut -b7-

hackerrank_practices/37_uniq_3.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This time, compare consecutive lines in a case insensitive manner. So, if a line X is followed by case variants, the output should count all of them as the same (but display only the form X in the second column).
2+
3+
uniq -ic|cut -c7-

hackerrank_practices/38_uniq_4.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Given a text file, display only those lines which are not followed or preceded by identical replications.
2+
3+
4+
uniq -u

0 commit comments

Comments
 (0)