• 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: Shared folders, WAS Checking for logged on guests
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shared folders, WAS Checking for logged on guests


  • Subject: Re: Shared folders, WAS Checking for logged on guests
  • From: Martin Orpen <email@hidden>
  • Date: Sat, 03 Jan 2004 23:46:57 +0000

Graff <email@hidden> wrote:

> I think you can do all that with just adding awk to your "do shell
> script". The awk tool splits a line up into text fields seperated by
> white space. Since you are really only interested in field 5 you can
> just add "| awk '{print $5}'" to your "do shell script" command
> -----------
> set theUserList to {}
> set theUsers to do shell script "netstat -na | grep '\\.548' | awk
> '{print $5}'"

[snip]

Why use grep & awk?

set theUsers to do shell script "netstat -na | awk '/.548/ {print $5}'"

Would do the trick wouldn't it?

--
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.

  • Follow-Ups:
    • Re: Shared folders, WAS Checking for logged on guests
      • From: Graff <email@hidden>
  • Prev by Date: Re: Is the Sidebar in Finder windows applescriptable?
  • Next by Date: are WeatherPop running
  • Previous by thread: Re: Shared folders, WAS Checking for logged on guests
  • Next by thread: Re: Shared folders, WAS Checking for logged on guests
  • Index(es):
    • Date
    • Thread