Re: Uptime
Re: Uptime
- Subject: Re: Uptime
- From: Gnarlodious <email@hidden>
- Date: Sun, 12 Sep 2004 15:17:14 -0600
Title: Re: Uptime
Entity John C. Welch spoke thus:
> Just copy and paste the code from SD to email. Don't use CSS in email, it's
> ridiculous overkill
That's what I did in my original post, but alas, the black background was discarded leaving the then low-contrast text to offend the reader.
This means that if I want to paste formatted and unwrapped text I would have to export the script to an HTML page (using CSS) then recolor the HTML with an Applescript.
Let me try this:
AirportUsers (AppleScript)
-- Script to log and report Airport Extreme wireless users
on run
set logFile to ((path to startup disk) & "private:tmp:TCP.txt" as string)
do shell script "osascript -e 'tell application \"Terminal\" to do script \"" & ("sudo tcpdump -i en1 port 80 >> " & the POSIX path of logFile) & "\"'"
end run
on reopen
set logFile to ((path to startup disk) & "private:tmp:TCP.txt" as string)
set logPOSIX to the quoted form of the POSIX path of logFile
display dialog (do shell script "perl -lne'@h{/\\b10\\.\\d+\\.\\d+\\.\\d+/g}=()}{print for keys%h' " & logPOSIX)
end reopen
Top | Made with Script Debugger 3.0
Well, that’s better than the colored version at least.
--Gnarlie
</BUSH>
_______________________________________________
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: Uptime (From: "John C. Welch" <email@hidden>) |