Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Parker Barrington <parkerb@tuns.ca>
To: parkerb@newton.ccs.tuns.ca
Subject: Substituting Characters ( ' with '' ) and ( & with and )
Date: 1995/10/25	[thread overview]
Message-ID: <1995Oct25.214509.2290@newton.ccs.tuns.ca> (raw)
In-Reply-To: 1995Oct24.201837.21442@newton.ccs.tuns.ca

Thank you everyone that answered my question on mailing with a subject 
line, I went with: mailx -s "Subject" email@address.here < filename.txt

Now I'm trying to change certain characters in a string. ie

I want 

O'Neil

to become

O''Neil

or 

John & Martha

to become

John and Martha

I've experimented with tr (translate) but it doesn't seem to allow you
to substitute a single with character several characters. eg.

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?

Thank you in advance.

-- 
Parker Barrington
Technical University of Nova Scotia
Continuing Education Division
http://www.ced.tuns.ca





       reply	other threads:[~1995-10-25  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 ` Parker Barrington [this message]
1995-10-27  4:00   ` Substituting Characters ( ' with '' ) and ( & with and ) Stefan Krieghoff
1995-10-25  4:00 ` (no subject) Mark Charette
1995-10-30  5:00 ` "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