Answers for "how to show the first and scond line in linux"

5

only show first lines linux

head -10 bar.txt
Posted by: Guest on June-13-2020
0

shell command read first lines

# credit to the Stack Overflow user in the source link
# the line is stored in a variable, remove 'line=' to print on display

line=$(head -n 1 filename)
Posted by: Guest on July-26-2021

Code answers related to "how to show the first and scond line in linux"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language