Answers for "copy first n lines of a file linux"

1

copy first 10 lines of a file to another file in unix

sed -n '1,10p' filename > newfile
Posted by: Guest on February-26-2021
0

copy first 100 lines from a file linux

head -n10 file.txt >> newfile.txt
echo "your line >> newfile.txt
tail -n +10 file.txt >> newfile.txt
Posted by: Guest on November-26-2021

Code answers related to "copy first n lines of a file linux"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language