*BSD News Article 84634


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!news.bbnplanet.com!cpk-news-hub1.bbnplanet.com!EU.net!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!dispatch.news.demon.net!demon!awfulhak.demon.co.uk!awfulhak.demon.co.uk!awfulhak.demon.co.uk!not-for-mail
From: brian@anorak.coverform.lan (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: How to embed a newline in pdksh string ?
Date: 10 Dec 1996 05:35:00 -0000
Organization: Coverform Ltd.
Lines: 22
Sender: brian@awfulhak.demon.co.uk
Message-ID: <58isq4$ag2@anorak.coverform.lan>
References: <stanbE21wK5.3zH@netcom.com>
Reply-To: brian%anorak.coverform.lan@awfulhak.demon.co.uk
NNTP-Posting-Host: localhost.coverform.lan
X-NNTP-Posting-Host: awfulhak.demon.co.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Newsreader: knews 0.9.8

In article <stanbE21wK5.3zH@netcom.com>,
	stanb@netcom.com (Stan Brown) writes:
: 	I am trying to port some user environement scripts to FreeBSD. I have
: most of this doen, but I can't for the life of me figure out how to embed a
: newloin in a string in pdksh.
: 
: 	Heres what Im trying to do: Normally I do this.
: 
: 	echo "\nWarining You Are Superuser\n"
: 
: 	How do I do this in pdksh ?

At a guess, pdksh is using the BSD style echo - no escape processing.  The
-e switch may change this - try

      echo -e "\nWarning You Are Superuser\n"

-- 
Brian <brian%anorak.coverform.lan@awfulhak.demon.co.uk>
      <http://www.awfulhak.demon.co.uk/>
Don't _EVER_ lose your sense of humour....
.