Re: Shared folders, WAS Checking for logged on guests
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.