HackerRank - Head of a Text File #2

April - 25/2025

Problem:

In this challenge, we practice using the head command to display the first n characters of a text file. Display the first 20 characters of an input file.

# Input

# Output

# Solution

            
    head -c 20
    

# Solution_01

            
    while read line
    do
        echo $line
    done | head -c 20
    

Post: