*BSD News Article 96702


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.netspace.net.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!news.maxwell.syr.edu!news.mathworks.com!fu-berlin.de!news.belwue.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!not-for-mail
From: Philipp Mergenthaler <un1i@rz.uni-karlsruhe.de>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: pdksh does not work!!!!! Please help
Date: 2 Jun 1997 11:40:01 GMT
Organization: University of Karlsruhe, Germany
Lines: 28
Sender: Philipp Mergenthaler <un1i@ab141.rz.uni-karlsruhe.de>
Message-ID: <5mubeh$lqe$1@nz12.rz.uni-karlsruhe.de>
References: <3391B2A4.41C67EA6@adelphia.net>
NNTP-Posting-Host: ab141.rz.uni-karlsruhe.de
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-User: un1i
X-Newsreader: TIN [UNIX 1.3 unoff BETA 970409; AIX 4.1]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:42038

 Glen <gippolit@adelphia.net> wrote:

> When I try to use print from the command line no problems,
> but if I use print in a shell script it say's can't find 
> print!!!!

> I alway's thought that print was a shell built in.
[...]

print is AFAIK a built-in command in the more modern shells, but not in
sh. So you can either
- use echo
- begin your shell script with #!/usr/local/bin/ksh (but notice, that
  you might now stumble upon other differences between ksh and sh)
- use printf instead of print. printf is similar to the c function with
  the same name. Notice: printf does _not_ append a newline to the text
  it prints, so when you use it from the command line, the last line of
  its output will be overwritten by the prompt.

Bye, Philipp

P.S.: your "!" key seems to get stuck easely.

-- 
P. Mergenthaler, un1i@rz.uni-karlsruhe.de  |  Wer halb gebildet, ist der
Tel.: 0721/694532                          |     schoenste Narr.
Klosterweg 28 / I609, 76131 Karlsruhe      | (Weiss jemand, von wem das ist?)
http://www.uni-karlsruhe.de/~un1i/         |