Question : find how many lines in a file linux
Answered by : angelos-panagiotakis
wc -l <filename>
Source : | Last Update : Fri, 12 Mar 21
Question : show specific lines in file linux
Answered by : emmanuel-titi
$ cat sample_file.txt | awk 'NR==9' #[Prints 9th line]
Source : | Last Update : Mon, 12 Sep 22
Question : how to display specific lines from a file in linux
Answered by : condemned-crayfish-tsor136oh4dy
Write a bash script to print a particular line from a file:
awk = $ awk '{if(NR==LINE_NUMBER) print $0}' file.txt
sed = $ sed -n LINE_NUMBERp file.txt
Source : | Last Update : Sun, 22 May 22