Skip to main content
Rollback to Revision 2
Source Link
user78605
user78605

With awk

awk 'x&&/S/{exit}x+=;x+=/R/' file 

Example

seq 20 | awk 'x&&/1/{exit}x+=;x+=/6/' 6 7 8 9 

With awk

awk 'x&&/S/{exit}x+=/R/' file 

Example

seq 20 | awk 'x&&/1/{exit}x+=/6/' 6 7 8 9 

With awk

awk 'x&&/S/{exit};x+=/R/' file 

Example

seq 20 | awk 'x&&/1/{exit};x+=/6/' 6 7 8 9 
Rollback to Revision 1
Source Link
user78605
user78605

With awk

awk 'x&&/S/{exit};x+=x+=/R/' file 

Example

seq 20 | awk 'x&&/1/{exit};x+=x+=/6/' 6 7 8 9 

With awk

awk 'x&&/S/{exit};x+=/R/' file 

Example

seq 20 | awk 'x&&/1/{exit};x+=/6/' 6 7 8 9 

With awk

awk 'x&&/S/{exit}x+=/R/' file 

Example

seq 20 | awk 'x&&/1/{exit}x+=/6/' 6 7 8 9 
POSIXified
Source Link
Stéphane Chazelas
  • 586.2k
  • 96
  • 1.1k
  • 1.7k

With awk

awk 'x&&/S/{exit}x+=;x+=/R/' file 

Example

seq 20 | awk 'x&&/1/{exit}x+=;x+=/6/' 6 7 8 9 

With awk

awk 'x&&/S/{exit}x+=/R/' file 

Example

seq 20 | awk 'x&&/1/{exit}x+=/6/' 6 7 8 9 

With awk

awk 'x&&/S/{exit};x+=/R/' file 

Example

seq 20 | awk 'x&&/1/{exit};x+=/6/' 6 7 8 9 
Source Link
user78605
user78605
Loading