I need to pass an argument through applescript to a unix program, basically I want to pass options to the applescript and then pass those options on to a unix program so i’ll have to open terminal and then execute it with the options specified to the applescript. I know how I can do it with prompting in the script but no idea how to do arguments on the command line.
Rather than passing the argument to terminal, wouldn’t you rather use ‘do shell script’? I suppose the UNIX command accepts a path to the target file as a parameter? Let’s say the unix command is ‘cat’–in that case, your AppleScript statement would look like this:
do shell script "cat -n " & “/tmp/theFile”
Of course, substitute the correct command, command line flags (switches, options), and path to your file. If you can be more specific about what you want to do, we can provide a more detailed response.