Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 332 Bytes

tenth-line.md

File metadata and controls

15 lines (11 loc) · 332 Bytes
#  Problem Name : Tenth Line
#  Problem URL : https://leetcode.com/problems/tenth-line/
#  Description :
#    WGiven a text file file.txt, print just the 10th line of the file.
#  Difficulty : Easy
#  Language : Bash
#  Category : Shell

#!/bin/bash

cat -n file.txt | grep -w 10 | awk '{ $1 = ""; print $0 }' | xargs