Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

grep nth line after match

awk 'c&&!--c;/pattern/{c=N}' file
Comment

grep Nth line after pattern

awk 'c&&!--c;/your_pattern/{c=3}' file
Comment

PREVIOUS NEXT
Code Example
Shell :: move files one level up linux 
Shell :: remove trailing slash 
Shell :: concatenate strings batch 
Shell :: git set upstream remote branch 
Shell :: install wkhtmltopdf linux command 
Shell :: get current branch name git 
Shell :: uninstall package with pip 
Shell :: linux ogg to wav 
Shell :: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory. 
Shell :: sudo a terminal is required to read the password 
Shell :: git add git commit 
Shell :: compress folder ubutnu 
Shell :: gitbash shortcut to clear the terminal 
Shell :: change password linux 
Shell :: docker-compose update changes 
Shell :: hardhat deploy 
Shell :: auth token 
Shell :: github change last commit message 
Shell :: kubectl create namespace 
Shell :: git merge strategies 
Shell :: sourcetree change commit message not pushed 
Shell :: bash read file line by line 
Shell :: android create keystore command line 
Shell :: how to revert to a specific commit in origin 
Shell :: ssh use key file 
Shell :: Replace git master with another branch 
Shell :: host key verification failed 
Shell :: s3 cli get list of files in folder 
Shell :: Grant Htaccess to all directory 
Shell :: How to find your ip on debian linux wsl 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =