RE: Another Shell Script question ftp
RE: Another Shell Script question ftp
- Subject: RE: Another Shell Script question ftp
- From: Doug McNutt <email@hidden>
- Date: Fri, 10 Feb 2006 14:18:53 -0700
At 11:24 -0800 2/10/06, Stockly, Ed wrote:
>You know I think it's taking my longer to learn shell scripting because I'm trying to do it through appleScript's do shell script command.
Wow. It's pretty clear that you are now comfortable with shell scripting. IMHO AppleScript is for those who are not.
A couple of suggestions:
1) Get into BBEdit worksheets. They're almost as good as Apple's, unsupported in OS neXt, MPW for handling a shell interface from a mouse-oriented text editor. Unfortunately BareBones' free version won't work that way.
2) Learn about the shell command osascript which allows simple AppleScripts to be executed from within a shell script. That is your link into other applications that offer only an AppleScript interface. You can place AppleScript commands in line using a UNIX "here document" syntax (<<).
3) It is possible to make a shell script executable with a #! (shebang) line at the top and an x bit in the permissions (chmod). It is also possible to make such a file double clickable from Finder. <ftp://ftp.macnauchtan.com/Software/PrepAPPL/PrepAPPL.scr> <ftp://ftp.macnauchtan.com/Software/PrepAPPL/ReadMe_PrepAPPL.text>
4) It's simple to write an AppleScript which will pass dropped file's into an executable shell script. You can also use that OS neXt implementation of the old stdfile selection process if you can stand it. "do shell script" is pretty reliable if all you pass to it is a POSIX path to your previously prepared script.
5) If you like Terminal.app use a named Terminal window and "tell" terminal to execute stuff "in window name". That way your operation can establish an environment that won't change. Commands like cd will stick until the window is closed. <ftp://ftp.macnauchtan.com/Software/Progress/tViewInit> <ftp://ftp.macnauchtan.com/Software/Progress/tView.text>
6) Consider the capability of ssh to execute a single command (scp) for file transfer. Personally I prefer curl but you may well find ssh easier to use than ftp and it does provide more security. Gnarlodious had something to say about that recently.
--
Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
_______________________________________________
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