How can I use
sed to match the search 'pattern' and reuse it again in the 'substitution' part?
Example: I want the command:
echo "12a34" | sed 's/a/#bcd/g'
What should be the
# parameter to get the right substitution?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community