Not really an applescript question...

Does anybody know of a command line editor/application (like Pico or Vi) that is separate from terminal? What I am trying to do is activate this application to edit (like Pico) a file and then update it without opening Terminal?

Your best bet is sed, the stream editor.

You pass sed the name of a file (or stdin) along with a number of statements that define what changes you want to make to the file. It processes the changes and posts the result on stdout.

Takes a little getting used to but it’s about the easiest way to manipulate text files without visually opening them.

man sed is your starting point

Of course, your other option (since this is an AppleScript forum) is to have AppleScript open the file, process the contents and write it back when you’re done :slight_smile:

Camelot,
Maybe you, or someone else, could help me. And maybe an applescript is the way to go. What I have, in a nutshell, is a UNIX program that monitors my computer to see if files have been added, modified or removed. It then prints out a report. I then manually update my database with the new info. Within this report I can check off which files to update (or not). But the command (for updating) only works in Pico or Vi; editors tied to Terminal. Once I figure out which files to update, this program asks me for a password and then updates the database. I am trying to automate this process without opening Terminal. Here’s the UNIX commands:

The order of each command is this:
1 Change directory
2 Start program
3 Update the database

I thought opening the report in Textedit might work except the report is encrypted and Textedit can’t pass any commands to Terminal re: the password.