• 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: "cd " and "tail -f" on a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "cd " and "tail -f" on a file


  • Subject: Re: "cd " and "tail -f" on a file
  • From: John Delacour <email@hidden>
  • Date: Mon, 17 Mar 2003 18:29:27 +0000
  • Mac-eudora-version: 6.0a11

At 9:05 am -0700 17/3/03, Todd Reid wrote:

Paul,
This works (thank you), returning a correct list of the files in the
targeted directory.

HOWEVER, what I need is to ultimately "tail -f" a file in that directory in
the Terminal itself.

So when I direct this script (accounting for the "do script" vs "do shell
script" differences") to the Terminal, I get a permissions denied error.

Try this:


set s to ""
repeat with i in {233, 131, 173, 230, 177, 159}
set s to s & (ASCII character i)
end repeat

set f to "" & (path to "docs") & "junk.txt"
open for access file f with write permission
set eof file f to 0
write s & return to file f
close access file f

tell application "Terminal"
set my text item delimiters to ""
activate
delay 1
set ls to paragraphs of "
cd ;
cd Docu* ;
tail -f junk.txt;
"
do script ("" & ls)
end tell
_______________________________________________
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.

References: 
 >Re: "cd " and "tail -f" on a file (From: Todd Reid <email@hidden>)

  • Prev by Date: Re: Perl or AppleScript ?
  • Next by Date: Re: Perl or AppleScript ?
  • Previous by thread: Re: "cd " and "tail -f" on a file
  • Next by thread: Script fo unlocking and locking files.
  • Index(es):
    • Date
    • Thread