Using Bash to extract part of a file

Posted by user349418 on Stack Overflow See other posts from Stack Overflow or by user349418
Published on 2010-05-24T23:11:07Z Indexed on 2010/05/24 23:21 UTC
Read the original article Hit count: 227

Filed under:

I've got a text file, and wish to extract every above the !--- comment ---! into a new file, not based line numbers (but checking for the comment), How would I do this?

test123
bob
ted
mouse
qwerty
!--- comment ---!
123456
098786

© Stack Overflow or respective owner

Related posts about bash