Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

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

sed -n '1,10p' filename > newfile
Comment

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
Comment

PREVIOUS NEXT
Code Example
Shell :: check mtu size linux 
Shell :: maximize and minimize buttons missing ubuntu 
Shell :: remove java specific version linux 
Shell :: vim set color scheme in vimrc 
Shell :: install brave browser download 
Shell :: digit sum number in c 
Shell :: sed with variable 
Shell :: du folder size 
Shell :: install react Spinner 
Shell :: ffmpeg from frames range to video 
Shell :: start up vagrant 
Shell :: git config ssh protocol 
Shell :: zshrc 
Shell :: bash modify file text 
Shell :: loop through a collection mongo db 
Shell :: wget mac robot 
Shell :: zip directory in linux 
Shell :: how to push to new branch in github 
Shell :: kill task linux ubuntu 
Shell :: gitlab docker installation 
Shell :: git pull in another branch 
Shell :: npm install sql 
Shell :: make a new branch git 
Shell :: remove write proteced in usb ubuntu 
Shell :: how to install vim on macos 
Shell :: concatenate strings bash 
Shell :: how to delete files in linux 
Shell :: install docker on windows server 2019 
Shell :: source bash_profile on startup mac 
Shell :: git pull only master branch 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =