• 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: tab delimited data file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tab delimited data file


  • Subject: Re: tab delimited data file
  • From: Martin Orpen <email@hidden>
  • Date: Thu, 26 Jun 2003 14:46:32 +0100

Earlier I wrote:

> If the values were random I'd probably sort the list first and then use uniq
> or look to awk or gawk for a solution.

As I throught:

% awk '{seen[$2]++; if (seen[$2]==1){print}}' yourfile.txt

Change the $2 to whatever bit of the line you want to use.

I just tested it with a 1000 lines of ping stats using:

% awk '{seen[$7]++; if (seen[$7]==1){print $5, $7}}' server.txt

And it returned the results in less than 1 second.

Don't see any point in using as - unless it's "do shell script..." :-)

--
Martin Orpen
Idea Digital Imaging Ltd -- The Image Specialists
http://www.idea-digital.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Calling OSX AppleScript from Classic Apps
  • Next by Date: Re: tab delimited data file
  • Previous by thread: Re: tab delimited data file
  • Next by thread: Re: tab delimited data file
  • Index(es):
    • Date
    • Thread