Applescript using terminal command "Last" output to a text file
I would like to have a script that executes the last command ( do shell script "last" ) and save the result as a text file to the desktop for whichever user runs the file.
Thanks.
I would like to have a script that executes the last command ( do shell script "last" ) and save the result as a text file to the desktop for whichever user runs the file.
Thanks.
Here:
do shell script "last > ~/Desktop/last.txt"
(132380)
Here:
do shell script "last > ~/Desktop/last.txt"
(132380)
Thanks... I thought I tried that but it gave me a permissions error. However it works so I'm a happy camper!
Applescript using terminal command "Last" output to a text file