Abstract

The sixth cut problem from HackerRank.

Cut 6#

Cut #6 | HackerRank

Problem#

Print the characters from the thirteenth position to the end.

Input Format#

A text file with lines of ASCII text only.

Constraints#

  • \(1 \le N \le 100\)

(\(N\) is the number of lines of text in the input file)

Output Format#

The output should contain \(N\) lines. For each input line, print the characters from the thirteenth position to the end.

Sample Input#

Sample Input

New York is a state in the Northeastern and Mid-Atlantic regions of the United States.
New York is the 27th-most extensive, the third-most populous populated of the 50 United States.
New York is bordered by New Jersey and Pennsylvania to the south.
About one third of all the battles of the Revolutionary War took place in New York.
Henry Hudson’s 1609 voyage marked the beginning of European involvement with the area.

Sample Output#

Sample Output

a state in the Northeastern and Mid-Atlantic regions of the United States.
the 27th-most extensive, the third-most populous populated of the 50 United States.
bordered by New Jersey and Pennsylvania to the south.
ird of all the battles of the Revolutionary War took place in New York.
‘s 1609 voyage marked the beginning of European involvement with the area.

Solution#

#!/usr/bin/env bash

# shellcheck disable=SC2162
while read line_txt; do
    echo "${line_txt}" | cut -c 13-
done