Is sh script faster than csh script ?

Peng Lee lee at iris.Ucdavis.EDU
Mon Sep 11 07:52:26 AEST 1989


------------------------
137 % cat iput
#!/bin/sh
#
#  intelligent put
#
case $# in
[01])   echo "Usage: $0 host filename [dis directory]";;
*)      host="$1"; shift
        user=`nfrh $host`
        rcp -r "$1" "$host"."$user":"$*" &
esac

138 % cat iput.c
#!/bin/csh
#
#  intelligent put ( csh script )
#

set user=`~/bin/nfrh $1`
rcp -r "$2" "$1"."$user":. &

139 % time iput bloom iput
0.0u 0.1s 0:00 73% 24+12k 0+0io 0pf+0w
140 % time iput.c bloom iput.c
[1] 26361
1.9u 1.5s 0:05 68% 136+85k 11+17io 2pf+0w
141 %
-------------------------
It seems that csh used a lot more memory, io, and had 2 pages fault.

Would any unix.wizards out there explain why csh is so slow?  Or did I
use the wrong command in the script?   

This test is done VAX. 

Peng (lee at iris.ucdavis.edu)



More information about the Comp.unix.wizards mailing list