addressalign-toparrow-leftarrow-leftarrow-right-10x10arrow-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 1languagelaunch-new-window--smalllight-bulblightning-boltlinklocation-pinlockm-swarmSearchmailmediummessagesminusmobilemoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstar-shapestartickettrashtriangle-downtriangle-uptwitteruserwarningyahooyoutube

sed help

From: mowglie
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
group are also in: