Hi, Thanks for taking a look.
The SPARC system is a Sun V440 with 4 CPUs and 16GB of RAM. The normal CPU load is about 50% and minimal disk activity. What the script does is to go through a text file and get the beginning & ending line # for printing the pages specified. The part of the script that is taking over 20min on Solaris is quoted here. I ran the script in the /tmp folder on both the Solaris & Linux systems. [code] #!/usr/bin/bash # # set -x # # authen=$1 prt_req_id=82044908 page_from=200 page_to=250 printer=nec_p2000 copies=0 printed=1 file_dir=./ org_file=o${prt_req_id}.out dest_file=o${prt_req_id}.prt line=0 page=1 BeginLine=1 EndLine=0 page_to=`echo ${page_to} + 1 | bc` echo `date` echo "Calculating line numbers." while read a do line=`echo ${line} + 1 | bc` if [ "`echo ${a} | cut -b1`" = ^L ] then page=`echo ${page} + 1 | bc` if [ ${page_from} -eq ${page} ] then BeginLine=`echo ${line} | bc` fi if [ ${page_to} -eq ${page} ] then EndLine=`echo ${line} - 1 | bc` break fi fi done<<list `cat ${file_dir}/${org_file}` list [/code] -- This message posted from opensolaris.org _______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org