6 deleted 11 characters in body
source | link

I have below text:

add gmt version date
comment - text1
text1 continue
comment - text2
text2 continue
comment - text 3
text3 continue

I want all text from first occurrence of "comment" to end of file. I was using sed 's/^.*Comment - //g' I am getting only below text:

 text 3
 text3 continue

i.e. from last occurrence of "comment" to end of file. but I need all text from first occurrence of "comment" to end of text i.e.

    text1
    text1 continue
    comment - text2
    text2 continue
    comment - text 3
    text3 continue

Any help?

I have below text:

add gmt version date
comment - text1
text1 continue
comment - text2
text2 continue
comment - text 3
text3 continue

I want all text from first occurrence of "comment" to end of file. I was using sed 's/^.*Comment - //g' I am getting only below text:

 text 3
 text3 continue

i.e. from last occurrence of "comment" to end of file. but I need all text from first occurrence of "comment" to end of text i.e.

    text1
    text1 continue
    comment - text2
    text2 continue
    comment - text 3
    text3 continue

Any help?

I have below text:

add gmt version date
comment - text1
text1 continue
comment - text2
text2 continue
comment - text 3
text3 continue

I want all text from first occurrence of "comment" to end of file. I was using sed 's/^.*Comment - //g' I am getting only below text:

 text 3
 text3 continue

i.e. from last occurrence of "comment" to end of file. but I need all text from first occurrence of "comment" to end of text i.e.

    text1
    text1 continue
    comment - text2
    text2 continue
    comment - text 3
    text3 continue
    Post Closed as "unclear what you're asking" by Kusalananda, Mongrel, mdpc, GAD3R, roaima
5 edited title to be more inline with the question
| link

match Delete up to first occurrence in sed, edit that line and print the remaining lines unchanged

4 added 3 characters in body
source | link

I have below text:

add gmt version date
comment - text1
text1 continue
comment - text2
text2 continue
comment - text 3
text3 continue

I want all text from first occurrence of "comment" to end of file. I was using sed 's/^.*Comment - //g' I am getting only below text:

 text 3
 text3 continue

i.e. from last occurrence of "comment" to end of file. but I need all text from first occurrence of "comment" to end of text i.e.

    text1
    text1 continue
    comment - text2
    text2 continue
    comment - text 3
    text3 continue

Any help?

I have below text:

add gmt version date
comment - text1
text1 continue
comment - text2
text2 continue
comment - text 3
text3 continue

I want all text from first occurrence of "comment" to end of file. I was using sed 's/^.*Comment//g' I am getting only below text:

 text 3
 text3 continue

i.e. from last occurrence of "comment" to end of file. but I need all text from first occurrence of "comment" to end of text i.e.

    text1
    text1 continue
    comment - text2
    text2 continue
    comment - text 3
    text3 continue

Any help?

I have below text:

add gmt version date
comment - text1
text1 continue
comment - text2
text2 continue
comment - text 3
text3 continue

I want all text from first occurrence of "comment" to end of file. I was using sed 's/^.*Comment - //g' I am getting only below text:

 text 3
 text3 continue

i.e. from last occurrence of "comment" to end of file. but I need all text from first occurrence of "comment" to end of text i.e.

    text1
    text1 continue
    comment - text2
    text2 continue
    comment - text 3
    text3 continue

Any help?

3 added 158 characters in body
source | link
2 edited tags; corrected language
source | link
1
source | link