Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

vim remove line by pattern from all files

" To delete empty lines or lines with white spaces (s)
:g/^s*$/d
Comment

vim delete all lines

:1,$d
Comment

vim delete every other line

:1d|g/^/+d  # Every other odd line
Comment

vim delete every other line

:g/^/+d  # Every other even line
Comment

Vim deleting all lines containing pattern

//Delete all lines containing profile
:g/profile/d
Comment

PREVIOUS NEXT
Code Example
Shell :: how to paste the lines in the buffer into the text after the current line in vi 
Shell :: uninstall en_web_core md 
Shell :: mv command in linux to rename 
Shell :: ho to autostart chrome on linux boot 
Shell :: disable open file explorer erverytime i connect usb ubuntu 
Shell :: how to create matrix in git bash 
Shell :: 7z extract to folder with same name linux 
Shell :: setting config source di linux 
Shell :: anonymous github email 
Shell :: how to install alacritty on ubuntu 
Shell :: powershell reload updated module 
Shell :: Using ffmpeg to split video files by size 
Shell :: grep substring in shell 
Shell :: avalible ios simulators 
Shell :: how to find out what packages I installed from the AUR 
Shell :: managed mode linux kali 
Shell :: bash variable in string 
Shell :: how to active telnet on windows 10 telnet 
Shell :: docker list images and remove them 
Shell :: updated git but still showing old version 
Shell :: ubuntu dock setting 
Shell :: linux remove null bytes from file 
Shell :: ghc change version 
Shell :: awk print all columns 
Shell :: notifications are currently provided by knopwob dunst 
Shell :: change user run docker 
Shell :: git submodule update init no url found 
Shell :: arch jpg to png 
Shell :: fast backup mac 
Shell :: ubuntu check usb connections 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =