Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash delete a range of lines from a file

# Basic syntax using sed:
sed 'm,nd' input_file
# Where m is the start line number and n is the end line number inclusive

# Note, add -i to delete the lines in place. E.g.: 
sed -i 'm,nd' input_file # This changes the original input_file
Comment

PREVIOUS NEXT
Code Example
Shell :: git remove file from history 
Shell :: odoo12 installation in ubuntu 16.04 
Shell :: run cmd as administrator command line 
Shell :: compare local branch with remote branch 
Shell :: how to stop docker 
Shell :: change default kube editor nano 
Shell :: install spotify on linux 
Shell :: Terminal commands to push a file to Github 
Shell :: ubuntu change directory owner 
Shell :: ubuntu git https not supported 
Shell :: how to list running processes in linux 
Shell :: echo with color from bash 
Shell :: dowload latest release github curl 
Shell :: command to check the free disk space 
Shell :: ubuntu install jellyfin 
Shell :: ubuntu arial font 
Shell :: gh login with github 
Shell :: ubuntu set date time command line 
Shell :: mac terminal restart 
Shell :: how to run verilog files in linux 
Shell :: heroku postgres reset database 
Shell :: git update password 
Shell :: reset bash_profile 
Shell :: how to mount a hard drive in ubuntu 
Shell :: pass awk varible to bash 
Shell :: command line calculate folder size 
Shell :: reset gui linux 
Shell :: how to convert pyqt5 to python 
Shell :: concatenate strings batch 
Shell :: git set origin 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =