{"id":13641924,"url":"https://github.com/Thomas-George-T/HackerRank-The-Linux-Shell-Challenges-Solutions","last_synced_at":"2025-04-20T12:30:59.418Z","repository":{"id":43815831,"uuid":"117837470","full_name":"Thomas-George-T/HackerRank-The-Linux-Shell-Challenges-Solutions","owner":"Thomas-George-T","description":"Complete Solutions and related tutorials  for the Linux Shell - Bash, text processing, Arrays in Bash, Grep Sed Awk Challenges on HackerRank","archived":false,"fork":false,"pushed_at":"2024-04-16T21:18:35.000Z","size":92,"stargazers_count":86,"open_issues_count":0,"forks_count":52,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-09T12:39:48.156Z","etag":null,"topics":["awk","bash","challenge","cut","grep","hackerrank","hackerrank-solutions","head","linux","linux-shell","paste","sed","shell","sort","tail","text-processing","tr","tutorial","uniq","unix"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Thomas-George-T.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-17T13:06:53.000Z","updated_at":"2024-10-24T16:32:11.000Z","dependencies_parsed_at":"2024-11-09T12:32:59.527Z","dependency_job_id":"7d68c4cf-9974-4352-99e8-f1df93636ee1","html_url":"https://github.com/Thomas-George-T/HackerRank-The-Linux-Shell-Challenges-Solutions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas-George-T%2FHackerRank-The-Linux-Shell-Challenges-Solutions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas-George-T%2FHackerRank-The-Linux-Shell-Challenges-Solutions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas-George-T%2FHackerRank-The-Linux-Shell-Challenges-Solutions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thomas-George-T%2FHackerRank-The-Linux-Shell-Challenges-Solutions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Thomas-George-T","download_url":"https://codeload.github.com/Thomas-George-T/HackerRank-The-Linux-Shell-Challenges-Solutions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249893360,"owners_count":21341435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["awk","bash","challenge","cut","grep","hackerrank","hackerrank-solutions","head","linux","linux-shell","paste","sed","shell","sort","tail","text-processing","tr","tutorial","uniq","unix"],"created_at":"2024-08-02T01:01:25.789Z","updated_at":"2025-04-20T12:30:59.409Z","avatar_url":"https://github.com/Thomas-George-T.png","language":"Shell","readme":"![GitHub](https://img.shields.io/github/license/Thomas-George-T/HackerRank-The-Linux-Shell-Challenges-Solutions.svg?style=flat)\n![GitHub top language](https://img.shields.io/github/languages/top/Thomas-George-T/HackerRank-The-Linux-Shell-Challenges-Solutions.svg?style=flat)\n![GitHub last commit](https://img.shields.io/github/last-commit/Thomas-George-T/HackerRank-The-Linux-Shell-Challenges-Solutions.svg?style=flat)\n![ViewCount](https://views.whatilearened.today/views/github/Thomas-George-T/HackerRank-The-Linux-Shell-Challenges-Solutions.svg?cache=remove)\n\n\u003cp align=\"center\"\u003e  \n\t\u003cbr\u003e\n\t\u003ca href=\"https://www.hackerrank.com/Thomas_George_T\"\u003e\n        \u003cimg height=100 src=\"https://hrcdn.net/community-frontend/assets/brand/logo-new-white-green-a5cb16e0ae.svg\"\u003e \n    \t\u003c/a\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\u003c/p\u003e\n\n## Description\nSolutions to all the easy, medium and hard challenges compiled with related learning resources for the Linux Shell Challenges on HackerRank. \n\nDomains included: \n* [Bash Challenges](https://github.com/Thomas-George-T/HackerRank-The-Linux-Shell-Challenges-Solutions#bash-challenges)\n* [Text Processing](https://github.com/Thomas-George-T/HackerRank-The-Linux-Shell-Challenges-Solutions#text-processing)\n* [Arrays in Bash](https://github.com/Thomas-George-T/HackerRank-The-Linux-Shell-Challenges-Solutions#arrays-in-bash)\n* [Grep Sed Awk](https://github.com/Thomas-George-T/HackerRank-The-Linux-Shell-Challenges-Solutions#grep-sed-awk)\n\n## Bash Challenges\n\n| Number | Challenges | Solutions |\n|:------:|------------|:---------:|\n| 1 |[Let's Echo!](https://www.hackerrank.com/challenges/bash-tutorials-lets-echo/problem) | [Solution.sh](Challenges/Bash/Let's%20Echo.sh)\n| 2 |[Looping and Skipping](https://www.hackerrank.com/challenges/bash-tutorials---looping-and-skipping/problem) | [Solution.sh](Challenges/Bash/Looping%20and%20Skipping.sh)\n| 3 |[A Personalized Echo](https://www.hackerrank.com/challenges/bash-tutorials---a-personalized-echo/problem) | [Solution.sh](Challenges/Bash/A%20Personalized%20Echo.sh)\n| 4 |[Looping with numbers](https://www.hackerrank.com/challenges/bash-tutorials---looping-with-numbers/problem) |  [Solution.sh](Challenges/Bash/Looping%20with%20Numbers.sh)\n| 5 |[The World of Numbers](https://www.hackerrank.com/challenges/bash-tutorials---the-world-of-numbers/problem) | [Solution.sh](Challenges/Bash/The%20World%20of%20Numbers.sh)\n| 6 |[Comparing Numbers](https://www.hackerrank.com/challenges/bash-tutorials---comparing-numbers/problem) | [Solution.sh](Challenges/Bash/Comparing%20Numbers.sh)\n| 7 |[Getting started with conditionals](https://www.hackerrank.com/challenges/bash-tutorials---getting-started-with-conditionals/problem) | [Solution.sh](Challenges/Bash/Getting%20started%20with%20conditionals.sh)\n| 8 |[More on Conditionals](https://www.hackerrank.com/challenges/bash-tutorials---more-on-conditionals/problem) | [Solution.sh](Challenges/Bash/More%20on%20Conditionals.sh)\n| 9 |[Arithmetic Operations](https://www.hackerrank.com/challenges/bash-tutorials---arithmetic-operations/problem) | [Solution.sh](Challenges/Bash/Arithmetic%20Operations.sh)\n| 10|[Compute the Average](https://www.hackerrank.com/challenges/bash-tutorials---compute-the-average/problem) | [Solution.sh](Challenges/Bash/Compute%20the%20average.sh)\n| 11|[Functions and Fractals - Recursive Trees - Bash!](https://www.hackerrank.com/challenges/fractal-trees-all/problem) | [Solution.sh](Challenges/Bash/Functions%20and%20Fractals%20-%20Recursive%20Trees%20-%20Bash!.sh)\n\n## Text Processing\n\n| Number | Challenge | Solutions |\n|:------:|-----------|:---------:|\n|1|[Cut #1](https://www.hackerrank.com/challenges/text-processing-cut-1/problem) | [Solution](Challenges/Text%20Processing/Cut%20%231.sh) |\n|2|[Cut #2](https://www.hackerrank.com/challenges/text-processing-cut-2/problem) | [Solution](Challenges/Text%20Processing/Cut%20%232.sh) |\n|3|[Cut #3](https://www.hackerrank.com/challenges/text-processing-cut-3/problem) | [Solution](Challenges/Text%20Processing/Cut%20%233.sh) |\n|4|[Cut #4](https://www.hackerrank.com/challenges/text-processing-cut-4/problem) | [Solution](Challenges/Text%20Processing/Cut%20%234%20.sh) |\n|5|[Cut #5](https://www.hackerrank.com/challenges/text-processing-cut-5/problem) | [Solution](Challenges/Text%20Processing/Cut%20%235.sh) |\n|6|[Cut #6](https://www.hackerrank.com/challenges/text-processing-cut-6/problem) | [Solution](Challenges/Text%20Processing/Cut%20%236.sh) |\n|7|[Cut #7](https://www.hackerrank.com/challenges/text-processing-cut-7/problem) | [Solution](Challenges/Text%20Processing/Cut%20%237.sh) |\n|8|[Cut #8](https://www.hackerrank.com/challenges/text-processing-cut-8/problem) | [Solution](Challenges/Text%20Processing/Cut%20%238.sh) |\n|9|[Cut #9](https://www.hackerrank.com/challenges/text-processing-cut-9/problem) | [Solution](Challenges/Text%20Processing/Cut%20%239.sh) |\n|10|[Head of a Text File #1](https://www.hackerrank.com/challenges/text-processing-head-1/problem) | [Solution](Challenges/Text%20Processing/Head%20of%20a%20Text%20File%20%231.sh) |\n|11|[Head of a Text File #2](https://www.hackerrank.com/challenges/text-processing-head-2/problem) | [Solution](Challenges/Text%20Processing/Head%20of%20a%20Text%20File%20%232.sh) |\n|12|[Middle of a Text File](https://www.hackerrank.com/challenges/text-processing-in-linux---the-middle-of-a-text-file/problem) | [Solution](Challenges/Text%20Processing/Middle%20of%20a%20Text%20File.sh) |\n|13|[Tail of a Text File #1](https://www.hackerrank.com/challenges/text-processing-tail-1/problem) | [Solution](Challenges/Text%20Processing/Tail%20of%20a%20Text%20File%20%231.sh) |\n|14|[Tail of a Text File #2](https://www.hackerrank.com/challenges/text-processing-tail-2/problem) | [Solution](Challenges/Text%20Processing/Tail%20of%20a%20Text%20File%20%232.sh) |\n|15|['Tr' Command #1](https://www.hackerrank.com/challenges/text-processing-tr-1/problem) | [Solution](Challenges/Text%20Processing/'Tr'%20Command%20%231.sh) |\n|16|['Tr' Command #2](https://www.hackerrank.com/challenges/text-processing-tr-2/problem) | [Solution](Challenges/Text%20Processing/'Tr'%20Command%20%232.sh) |\n|17|['Tr' Command #3](https://www.hackerrank.com/challenges/text-processing-tr-3/problem) | [Solution](Challenges/Text%20Processing/'Tr'%20Command%20%233.sh) |\n|18|[Sort Command #1](https://www.hackerrank.com/challenges/text-processing-sort-1/problem) | [Solution](Challenges/Text%20Processing/Sort%20Command%20%231.sh) |\n|19|[Sort Command #2](https://www.hackerrank.com/challenges/text-processing-sort-2/problem) | [Solution](Challenges/Text%20Processing/Sort%20Command%20%232.sh) |\n|20|[Sort Command #3](https://www.hackerrank.com/challenges/text-processing-sort-3/problem) | [Solution](Challenges/Text%20Processing/Sort%20Command%20%233.sh) |\n|21|[Sort Command #4](https://www.hackerrank.com/challenges/text-processing-sort-4/problem) | [Solution](Challenges/Text%20Processing/Sort%20Command%20%234.sh) |\n|22|[Sort Command #5](https://www.hackerrank.com/challenges/text-processing-sort-5/problem) | [Solution](Challenges/Text%20Processing/Sort%20Command%20%235.sh) |\n|23|[Sort Command #6](https://www.hackerrank.com/challenges/text-processing-sort-6/problem) | [Solution](Challenges/Text%20Processing/Sort%20command%20%236.sh) |\n|24|[Sort Command #7](https://www.hackerrank.com/challenges/text-processing-sort-7/problem) | [Solution](Challenges/Text%20Processing/Sort%20command%20%237.sh) |\n|25|['Uniq' Command #1](https://www.hackerrank.com/challenges/text-processing-in-linux-the-uniq-command-1/problem) | [Solution](Challenges/Text%20Processing/'Uniq'%20Command%20%231.sh) |\n|26|['Uniq' Command #2](https://www.hackerrank.com/challenges/text-processing-in-linux-the-uniq-command-2/problem) | [Solution](Challenges/Text%20Processing/'Uniq'%20Command%20%232.sh) |\n|27|['Uniq' Command #3](https://www.hackerrank.com/challenges/text-processing-in-linux-the-uniq-command-3/problem)| [Solution](Challenges/Text%20Processing/'Uniq'%20Command%20%233.sh) |\n|28|['Uniq' Command #4](https://www.hackerrank.com/challenges/text-processing-in-linux-the-uniq-command-4/problem) | [Solution](Challenges/Text%20Processing/'Uniq'%20Command%20%234.sh) |\n|29|[Paste - 1](https://www.hackerrank.com/challenges/paste-1/problem) | [Solution](Challenges/Text%20Processing/Paste%20-%201.sh) |\n|30|[Paste - 2](https://www.hackerrank.com/challenges/paste-2/problem) | [Solution](Challenges/Text%20Processing/Paste%20-%202.sh) |\n|31|[Paste - 3](https://www.hackerrank.com/challenges/paste-3/problem) | [Solution](Challenges/Text%20Processing/Paste%20-%203.sh) |\n|32|[Paste - 4](https://www.hackerrank.com/challenges/paste-4/problem) | [Solution](Challenges/Text%20Processing/Paste%20-%204.sh) |\n\n\n## Arrays in Bash\n\n| Number | Challenge | Solutions |\n|:------:|-----------|:---------:|\n|1|[Read in an Array](https://www.hackerrank.com/challenges/bash-tutorials-read-in-an-array/problem) | [Solution](Challenges/Arrays%20in%20Bash/Read%20in%20an%20Array.sh) |\n|2|[Slice an Array](https://www.hackerrank.com/challenges/bash-tutorials-slice-an-array/problem) | [Solution](Challenges/Arrays%20in%20Bash/Slice%20an%20Array.sh) |\n|3|[Filter an Array with Patterns](https://www.hackerrank.com/challenges/bash-tutorials-filter-an-array-with-patterns/problem) | [Solution](Challenges/Arrays%20in%20Bash/Filter%20an%20Array%20with%20Patterns.sh) |\n|4|[Concatenate an array with itself](https://www.hackerrank.com/challenges/bash-tutorials-concatenate-an-array-with-itself/problem) | [Solution](Challenges/Arrays%20in%20Bash/Concatenate%20an%20array%20with%20itself.sh) |\n|5|[Display an element of an array](https://www.hackerrank.com/challenges/bash-tutorials-display-the-third-element-of-an-array/problem) | [Solution](Challenges/Arrays%20in%20Bash/Display%20an%20element%20of%20an%20array.sh) |\n|6|[Count the number of elements in an Array](https://www.hackerrank.com/challenges/bash-tutorials-count-the-number-of-elements-in-an-array/problem) | [Solution](Challenges/Arrays%20in%20Bash/Count%20the%20number%20of%20elements%20in%20an%20Array.sh) |\n|7|[Remove the First Capital Letter from Each Element](https://www.hackerrank.com/challenges/bash-tutorials-remove-the-first-capital-letter-from-each-array-element/problem) | [Solution](Challenges/Arrays%20in%20Bash/Remove%20the%20First%20Capital%20Letter%20from%20Each%20Element.sh) |\n|8|[Lonely Integer - Bash!](https://www.hackerrank.com/challenges/lonely-integer-2/problem) | [Solution](Challenges/Arrays%20in%20Bash/Lonely%20Integer%20-%20Bash!.sh) |\n\n## Grep Sed Awk\n\n| Number | Challenge | Solutions |\n|:------:|-----------|:---------:|\n|1|['Grep' #1](https://www.hackerrank.com/challenges/text-processing-in-linux-the-grep-command-1/problem) | [Solution](Challenges/Grep%20Sed%20Awk/'Grep'%20%231.sh) |\n|2|['Grep' #2](https://www.hackerrank.com/challenges/text-processing-in-linux-the-grep-command-2/problem) | [Solution](Challenges/Grep%20Sed%20Awk/'Grep'%20%232.sh) |\n|3|['Grep' #3](https://www.hackerrank.com/challenges/text-processing-in-linux-the-grep-command-3/problem) | [Solution](Challenges/Grep%20Sed%20Awk/'Grep'%20%233.sh) |\n|4|['Grep' -A](https://www.hackerrank.com/challenges/text-processing-in-linux-the-grep-command-4/problem) | [Solution](Challenges/Grep%20Sed%20Awk/'Grep'%20-A.sh) |\n|5|['Grep' -B](https://www.hackerrank.com/challenges/text-processing-in-linux-the-grep-command-5/problem) | [Solution](Challenges/Grep%20Sed%20Awk/'Grep'%20-%20B.sh) |\n|6|['Sed' command #1](https://www.hackerrank.com/challenges/text-processing-in-linux-the-sed-command-1/problem) | [Solution](Challenges/Grep%20Sed%20Awk/'Sed'%20command%20%231.sh) |\n|7|['Sed' command #2](https://www.hackerrank.com/challenges/text-processing-in-linux-the-sed-command-2/problem) | [Solution](Challenges/Grep%20Sed%20Awk/'Sed'%20command%20%232.sh) |\n|8|['Sed' command #3](https://www.hackerrank.com/challenges/text-processing-in-linux-the-sed-command-3/problem) | [Solution](Challenges/Grep%20Sed%20Awk/'Sed'%20command%20%233.sh) |\n|9|['Sed' command #4](https://www.hackerrank.com/challenges/sed-command-4/problem) | [Solution](Challenges/Grep%20Sed%20Awk/'Sed'%20command%20%234.sh) |\n|10|['Sed' command #5](https://www.hackerrank.com/challenges/sed-command-5/problem) | [Solution](Challenges/Grep%20Sed%20Awk/'Sed'%20command%20%235.sh) |\n|11|['Awk' - 1](https://www.hackerrank.com/challenges/awk-1/problem) | [Solution](Challenges/Grep%20Sed%20Awk/'Awk'%20-%201.sh) |\n|12|['Awk' - 2](https://www.hackerrank.com/challenges/awk-2/problem) | [Solution](Challenges/Grep%20Sed%20Awk/'Awk'%20-%202.sh) |\n|13|['Awk' - 3](https://www.hackerrank.com/challenges/awk-3/problem) | [Solution](Challenges/Grep%20Sed%20Awk/'Awk'%20-%203.sh) |\n|14|['Awk' - 4](https://www.hackerrank.com/challenges/awk-4/problem) | [Solution](Challenges/Grep%20Sed%20Awk/'Awk'%20-%204.sh) |\n\n## Featured in\n- [lib4dev.in](http://www.lib4dev.in/info/Thomas-George-T/HackerRank-The-Linux-Shell-Challenges-Solutions/117837470)\n\n## References, Tutorials and Relevant Materials \n\n### General\n* [Shell Scripting video tutorial](https://www.youtube.com/watch?v=hwrnmQumtPw)\n\n### Bash\n* [Refresher to Bash](https://learnxinyminutes.com/docs/bash/)\n* [Quick guide to shell scripts](http://www.panix.com/~elflord/unix/bash-tute.html)\n* [Catching user input](http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_08_02.html)\n* [Loops in Bash](https://www.cyberciti.biz/faq/bash-for-loop/)\n\n### Text Processing \n* [Cut](https://www.geeksforgeeks.org/cut-command-linux-examples/)\n* [Head](https://www.geeksforgeeks.org/head-command-linux-examples/)\n* [Tr video](https://www.youtube.com/watch?v=RNuh1rqKIbg\u0026feature=youtu.be)\n* [Sort](https://www.thegeekstuff.com/2013/04/sort-files/)\n* [Uniq video](https://youtu.be/VRrd9ErU13w)\n* [Uniq](https://www.thegeekstuff.com/2013/05/uniq-command-examples/)\n* [Paste video](https://www.youtube.com/watch?v=DCJPFjS_vss)\n* [Paste](http://www.theunixschool.com/2012/07/10-examples-of-paste-command-usage-in.html)\n\n### Arrays in Bash\n* [Array Tutorial](https://www.thegeekstuff.com/2010/06/bash-array-tutorial/)\n","funding_links":[],"categories":["Linux Basics"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThomas-George-T%2FHackerRank-The-Linux-Shell-Challenges-Solutions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FThomas-George-T%2FHackerRank-The-Linux-Shell-Challenges-Solutions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThomas-George-T%2FHackerRank-The-Linux-Shell-Challenges-Solutions/lists"}