HP3000-L Archives

April 2001, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Gavin Scott <[log in to unmask]>
Reply To:
Gavin Scott <[log in to unmask]>
Date:
Fri, 20 Apr 2001 13:58:04 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (37 lines)
Frank brings us the list of built in functions:
> The following commands are built into the shell.

One thing to note is that while the commands below are built in and can be
executed efficiently without a fork()/exec() most of the time, there are
some common cases where at least a fork() is still required.

Any time the pipe "|" function is used to connect the output of one command
to the input of another the shell will have to fork() at least once.

Any expression in backtic "`" characters will cause the shell to fork().
For example the shell statement:

   export now=`date +%H%M`

has to fork() in order to capture the output of the date command even though
"date" is built into the shell.  This is the sort of thing which takes
virtually no time on Unix but is quite expensive on MPE.

So even a shell script that uses nothing but the commands below can still
result in extreme slowdowns due to fork() overhead if it uses pipes and the
`expression` syntax (maybe other things too, but those are the ones I know
of).

> : . [ alias basename break callci cat cd chmod chown command continue cp
> echo eval exec exit export false fc frombyte getopts jobs kill
> let ln ls mv
> print printf pwd read readonly return rm set shift test time times tobyte
> trap true type typeset umask unalias unset wait whence

Nice to have the complete list, thanks.

G.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2