cat file.txt|grep -n ""|grep "^10:"|cut -d ":" -f2
Thanks for sharing, but the 10th line is hard coded, what if there are less than 10 lines
cat file.txt | sed -n 10p
This solution is much more readable and can be accepted!
I think should be null.
If use sed
sed '10p' file.txt
To make this faster
sed '10d;q' file.txt
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.