Need a quick sed recipe :-(

Michael ODonnell michael.odonnell at comcast.net
Tue Aug 23 15:06:01 EDT 2005


# echo This is the replacement line >/tmp/replacementFile
# cat <<EOF >/tmp/sedScript
/MARKER/ {
	r /tmp/replacementFile
	d
}
EOF
# cat <<EOF >/tmp/testText
This
is the
test text and
the next line should have been replaced:
MARKER
Hi, Mom!  did it work?
EOF
# sed -f /tmp/sedScript </tmp/testText




More information about the gnhlug-discuss mailing list