Answers for "shell show specific line from file"

1

bash script to output a specific line of a file

/**
* A bash script to print at stdout line_number from file_name
* @line_number: the line number you want to print
* @file_name: the file you want to read from
*/

awk '{if(NR==line_number) print $0}' file_name
Posted by: Guest on August-19-2021
0

shell get all lines that are in one file and not another

diff file2 file1 | grep '^>' | sed 's/^> //'
Posted by: Guest on October-10-2021

Code answers related to "shell show specific line from file"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language