Method 1
sed 100q $file > output.txt
Method 2
head -n 100 $file > output.txt
Method 3
sed -n '1,100p;101q' $file > output.txt
How do I extract a range of lines from a big text file to a separate file via Bash?
sed 100q $file > output.txt
head -n 100 $file > output.txt
sed -n '1,100p;101q' $file > output.txt
How do I extract a range of lines from a big text file to a separate file via Bash?