Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #copy #lines #file #linux
ADD COMMENT
Topic
Name
1+1 =