In this post, we will solve Cut #1 HackerRank Solution. This problem (Cut #1) is a part of HackerRank Linux Shell series.
Given N lines of input, print the 3rd character from each line as a new line of output. It is guaranteed that each of the n lines of input will have a 3rd character.
A text file containing N lines of ASCII characters.
- 1 <= N <= 100
For each line of input, print its 3rd character on a new line for a total of N lines of output.
Hello World how are you
l r w
Solution – Cut #1 – HackerRank Solution
# print the 3rd character from each line as a new line of output. cut -c 3