RunRyder RC
WATCH
 1 page 221 views POST REPLY
Home🌌Off TopicsOff Topics Main Discussion › sed multiple regex
09-08-2018 11:49 PM  15 months ago
Topic Vote0Post 1
Xterra

rrApprentice

USA

MyPosts All Forum Topic
sed multiple regex
For the scripters. Is there a way to include both "new lines" in one regex to avoid using the second substitution script?
sed -i ':a /^>/!N;s/\r\n\([^>]\)/\1/;s/\n\([^>]\)/\1/;ta'

Stratus
Raptor 50V2
T-rex SE
T-rex CDE
T-rex 250 SC
Kyosho M24
SHARE  PM  EMAIL  HOMEPAGE  GALLERY  Attn:RR  Quote
09-09-2018 02:51 PM  15 months ago
Xterra

rrApprentice

USA

MyPosts All Forum Topic
Just figured it out
':a /^>/!N;s/\r\?\n\([^>]\)/\1/;ta'
I can't believe I did not see it yesterday -long day I guess.

Stratus
Raptor 50V2
T-rex SE
T-rex CDE
T-rex 250 SC
Kyosho M24
SHARE  PM  EMAIL  HOMEPAGE  GALLERY  Attn:RR  Quote
WATCH
 1 page 221 views POST REPLY
Home🌌Off TopicsOff Topics Main Discussion › sed multiple regex
 Print TOPIC  Make Suggestion 

 0  Topic Subscribe

Sunday, December 8 - 8:43 am - Copyright © 2000-2019 RunRyder   EMAILEnable Cookies

Login Here
 New Subscriptions 
 Buddies Online