addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcredit-cardcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1launch-new-window--smalllight-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

sed help

From: mowgli
Sent on: Monday, February 17, 2014 10:46 PM
using sed (or awk or whatever is best/shortest command), how do i replace ALL the text from a matchedpattern to EOF in a file?

ie if the file is:

blahblahblah
moreblah
replacefromhereon
xxxx
.....
yyyy

and i want the file to be:

blahblahblah
moreblah
newtexthere
morenewtexthere.

except i wont know what all the text after "replacefromhereon" is.  so i need to replace from that matched pattern to EOF regardless of whats there.

how do i achieve in simplest way?

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy