From: stefan@gatz.atlas.de (Stefan Krieghoff)
Subject: Re: Substituting Characters ( ' with '' ) and ( & with and )
Date: 1995/10/27 [thread overview]
Message-ID: <46qu47$fnj@pink.atlas.de> (raw)
In-Reply-To: 1995Oct25.214509.2290@newton.ccs.tuns.ca
: test=O\'Neil
: echo $test | tr '\047' '\047\047'
: O'Neil
: test="John & Martha"
: echo $test | tr '\046' and
: John a Martha
: How can I substitute a single character with several?
Try
test=O\'Neil
echo $test | sed "s/'/''/g"
O''Neil
and
test="John & Martha"
echo "${test}" | sed "s/&/a/g"
John a Martha
:-)) Stefan
_/_/_/_/ _/_/_/ _/ _/_/_/_/ _/_/_/ AEG Atlas Schutz-u. Leittech. GmbH,
_/ _/ _/ _/ _/ _/ _/ Stefan Krieghoff, Abt. LT524
_/_/_/_/ _/ _/ _/_/_/_/ _/_/_/ D-28305 Bremen
_/ _/ _/ _/ _/ _/ _/ +49/421/457-2017 -3886 fax
_/ _/ _/ _/_/_/ _/ _/ _/_/_/ stefan@gatz.atlas.de
next prev parent reply other threads:[~1995-10-27 4:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1995Oct24.201837.21442@newton.ccs.tuns.ca>
1995-10-25 4:00 ` (no subject) Mark Charette
1995-10-25 4:00 ` Substituting Characters ( ' with '' ) and ( & with and ) Parker Barrington
1995-10-27 4:00 ` Stefan Krieghoff [this message]
1995-10-30 5:00 ` (no subject) "Mark Jeffery"
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox