Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Here's one solution' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Here's one solution
Authored by: saint.duo on May 26, '04 12:00:48PM
IF /path/to/your/logfiles/ is the same folder as this_folder, then changing this should work:

tell application "Terminal"
        activate
        do script with command ¬
         "/usr/bin/tail -100f '" & (quoted form of POSIX path of this_folder) & ¬
         theName & "';exit"
end tell
I hope I cleaned up the quotes properly. I'm not familiar with the tail command. There is a space and a single quote between -100f and the quotation mark.

---
--
duo

[ Reply to This | # ]

Here's one solution - quotes in wrong place
Authored by: Krioni on May 27, '04 10:34:26AM
Your quotes are in the wrong place - you have to combine the two strings BEFORE you quote them, otherwise you'd get 'something''somethingelse' which will not work.

tell application "Terminal"
	activate
	do script with command ¬
		"tail -100f " & (quoted form of ((POSIX path of this_folder) & theName)) & ";exit"
end tell
So, we combine the Posix path of this_folder with theName FIRST, then we get the quoted form of it. Note that also means you do NOT include the single quotes yourself - that's what "quoted form of" does.

Also, you don't need to specify where "tail" is by using the full path, unless you're afraid the user may have another version of tail that you don't want to use.

[ Reply to This | # ]