Hello Programmers, In this post, you will know how to solve the Lonely Integer – Bash! HackerRank Solution. This problem is a part of the HackerRank Linux Shell Series.Lonely Integer – Bash! HackerRank SolutionsOne more thing to add, don’t directly look for the solutions, first try to solve the problems of Hackerrank by yourself. If you find any difficulty after trying several times, then you can look for solutions.Lonely Integer – Bash! HackerRank SolutionProblemThere are N integers in an array A. All but one integer occur in pairs. Your task is to find the number that occurs only once.Input FormatThe first line of the input contains an integer N, indicating the number of integers. The next line contains N space-separated integers that form the array A.Constraints1 <= N < 100N % 2 = 1 (N is an odd number)0 <= A[i] <= 100Output FormatOutput S, the number that occurs only once.Sample Input:111Sample Output:11Sample Input:231 1 2Sample Output:22Sample Input:350 0 1 2 1Sample Output:32ExplanationIn the first input, we see only one element (1) and that element is the answer.In the second input, we see three elements; 1 occurs at two places and 2 only once. Thus, the answer is 2.In the third input, we see five elements. 1 and 0 occur twice. The element that occurs only once is 2.Lonely Integer – Bash! HackerRank Solution#There are N integers in an array A. All but one integer occur in pairs. Your task is to find the number that occurs only once read arr=($(cat)) echo "${arr[@]}" | tr ' ' '\n' |sort | uniq -u | tr '\n' ' 'Note: This problem (Lonely Integer – Bash!) is generated by HackerRank but the Solution is Provided by BrokenProgrammers. This tutorial is only for Educational and Learning purposes.Next: Remove the First Capital Letter From Each Element HackerRank Solution Post navigation‘Awk’ 3 HackerRank Solution Remove the First Capital Letter From Each Element HackerRank Solution