From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,4d47729f490e75c3 X-Google-Attributes: gidfee84,public From: stefan@gatz.atlas.de (Stefan Krieghoff) Subject: Re: Substituting Characters ( ' with '' ) and ( & with and ) Date: 1995/10/27 Message-ID: <46qu47$fnj@pink.atlas.de>#1/1 X-Deja-AN: 118247590 references: <1995Oct24.201837.21442@newton.ccs.tuns.ca> <1995Oct25.214509.2290@newton.ccs.tuns.ca> organization: Atlas Elektronik GmbH newsgroups: comp.unix.osf.osf1 : 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