Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer > Re: ksh scripti...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 4 Topic 992 of 1040
Post > Topic >>

Re: ksh scripting problem

by Robert Peirce <bob@[EMAIL PROTECTED] > Feb 8, 2008 at 06:41 PM

I was advised to use the ksh built-in read line to read in a really huge 
file.  Well, it turns out, probably because ksh is an interpreter, that 
read line, at least as demonstrated by the following script

#!/bin/ksh
exec 0< "db/s.p"
while read line
do
   print $line >> /dev/null   [echo is actually a hair faster]
done

takes way, way longer than cat db/s.p.  Consequently, unless someone can 
give me a very fast way to use read line, I am going to stick with my 
kludge of splitting s.p into 50,000 line pieces and processing them in 
order.

-- 
Robert B. Peirce, Venetia, PA  724-941-6883
bob AT peirce-family.com [Mac]
rbp AT cooksonpeirce.com [Office]
 




 4 Posts in Topic:
ksh scripting problem
Robert Peirce <bob@[EM  2008-02-08 15:15:13 
Re: ksh scripting problem
Robert Peirce <bob@[EM  2008-02-08 16:05:51 
Re: ksh scripting problem
Robert Peirce <bob@[EM  2008-02-08 16:53:31 
Re: ksh scripting problem
Robert Peirce <bob@[EM  2008-02-08 18:41:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 9:34:47 CST 2008.