Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- START
- ...
- ...
- END
- START
- ...
- ...
- END
- sed '/START/,/END/{/START/{h;d};H;/END/{g;s/.../foo/gp};d}' file
- START
- foo
- foo
- END
- START
- foo
- foo
- END
- awk '/START/{p=1;n++};p{if(n==1)sub(/.../,"foo");if(n==2)sub(/.../,"bar");print};/END/{p=0}' file
- START
- foo
- foo
- END
- START
- bar
- bar
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement