• 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: "Andrew T. Lynch" <email@hidden>
  • Date: Fri, 12 Nov 2004 15:02:27 -0800

Or,

cat /SystemProfile.txt | wc -l

-Drew

On Nov 12, 2004, at 2:04 PM, Paul Berkowitz wrote:

In this particular case, all I want is the number of lines, not the file
name which wc -l adds on to the end. I guess you could remove that with a
grep. Gnarlodius sent me:


do shell script "sed -n '$=' /SystemProfile.txt"


which works perfectly. (In fact it gives the answer "1" when there's a Mac
file with no LFs. whereas wc -l says the answer is "0", which is
interesting.)


-- Paul Berkowitz


From: Courtney Schwartz <email@hidden>
Date: Fri, 12 Nov 2004 16:30:19 -0500
To: AppleScript User's List <email@hidden>
Subject: Re: Count lines

Here here for wc! Wish you could run that from TextEdit using Services
menu or something. I think it's kind of weird, actually, given the
other Unix utilities that OS X makes use of, that it doesn't seem to
use wc... So In the meanwhile, I:


1) Open Terminal.
2) Type

wc -l /folder/file.txt

and then press return.

Or run a bash script on a set of text files. Or run an AppleScript with
a 'do script' if you want.


Courtney Schwartz

On Nov 12, 2004, at 4:05 PM, email@hidden wrote:

wc -l

*****************************************
Mark E. Napier
Manager of Information Systems
School of Library and Information Science
Indiana University
******************************************

On Fri, 12 Nov 2004, John C. Welch wrote:

On 11/12/2004 14:37, "Paul Berkowitz" <email@hidden> wrote:

What's the simplest way to count unix lines of a text file?

Use BBEdit

--------------------------------------------------------
      Misquotation of unattributed, trite
        metaphysical saying goes here.

  Stupid ascii               Unnecessary notice of
graphic goes here.        responsibility goes here.
---------------------------------------------------------


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: email@hidden

This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden

- Andrew T. Lynch
- Chief Zymurgist
- Verisity Design Inc.
- (650)934-6875

_______________________________________________
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


  • Follow-Ups:
    • Re: Count lines
      • From: Gnarlodious <email@hidden>
    • Re: Count lines
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Count lines (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: Count lines
  • Next by Date: Re: Count lines
  • Previous by thread: Re: Count lines
  • Next by thread: Re: Count lines
  • Index(es):
    • Date
    • Thread