• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Count lines
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Count lines


  • Subject: Re: Count lines
  • From: Christopher Nebel <email@hidden>
  • Date: Fri, 12 Nov 2004 19:53:02 -0800

On Nov 12, 2004, at 4:28 PM, Gnarlodious wrote:

Entity Andrew T. Lynch spoke thus:

cat /SystemProfile.txt | wc -l

This may be a poor choice for large files. I believe there's a size limit on
shell commands which is why working with the text file is best. I seem to
recall Panther upped the limit to 65k but could be wrong.

You're thinking of the limit on the size of command-line arguments. (It used to be 64KB; Panther raised it to 256KB. You can get the current value by saying "sysctl kern.argmax".) Stdin has no such limitation; it's effectively infinite, so the above variant is fine regardless of file size.



--Chris Nebel AppleScript Engineering _______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: Count lines (From: Gnarlodious <email@hidden>)

  • Prev by Date: Re: Count lines
  • Next by Date: Re: computing 20! all the way
  • Previous by thread: Re: Count lines
  • Next by thread: Re: Count lines
  • Index(es):
    • Date
    • Thread