Unix on a Mac OS X

 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Unix on a Mac OS X
# 1  
Old 08-08-2009
Unix on a Mac OS X

Hi. I'm using a Mac computer to perform all my Unix operations. At the moment, I'm employing osascript to interact between windows and don't know whether the same is possible to do it on a BASH shell without calling osascript. If so, I would like to see an example of how to do it.

Many thanks in advance.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

unix on mac

Hello, I formated my hard disk and i recovered some videos, but the thing is the videos were in .MOV format and now there are just UNIX executable files, i tried to write at the end of the name the extension but quicktime didn't recognize me the videos, somebody can help me with this problem... (1 Reply)
Discussion started by: arielorc
1 Replies

2. OS X (Apple)

Mac OS X & UNIX

I just joined the Forum a few days ago! :) I have a mac book and decided to look under the hood. Low and behold, UNIX! To be honest, I know nothing about unix, but I want to learn. I have no real goals as of yet, other than to learn what I can. I do own a few domains hosted by a good company. ... (4 Replies)
Discussion started by: fellojello
4 Replies

3. UNIX for Dummies Questions & Answers

mac unix

hi, i'm running mac 10.5, and i have a file eg. program after i compiled on the terminal using this command; cc -o program program.c however, i'm unable to see the process hierachy for that program. i tried using "ps -C program -l --forest" and unable to see the tree structure. need... (1 Reply)
Discussion started by: grotesque
1 Replies

4. OS X (Apple)

mac unix

Can anyone tell me were to download unix software for Mac OS X (10 Replies)
Discussion started by: ezadea
10 Replies

5. OS X (Apple)

unix flavour on mac

I'm quite interested in resusing an old bondi iMac i have as a unix box, and i was wondering what distro people would recomend. I had thought of using BSD/FreeBSD cos thats what osx is based on. I'm doing this as a teaching excercise (for myself) so i'm looking for something achievable rather than... (9 Replies)
Discussion started by: ora
9 Replies

6. UNIX Desktop Questions & Answers

Mac OS X & Unix.

Are the Terminal commands used in Mac OS 10.1.3 the same as those found on a real Unix system? if they are, what book would you recommend as a terminal refferance guide? I already have 'The Missing Manual' by O'Reilly, but there ain't much in terms of managing the system via the terminal :( ... (9 Replies)
Discussion started by: LAdesign
9 Replies

7. UNIX for Dummies Questions & Answers

Unix on Mac

Simple Q here. What GOOD telnet programs are out there for MAC. I use this one that can't utilize the VI editor. I don't know why. Thankx for your help in advance. /D (8 Replies)
Discussion started by: DIEZEL
8 Replies
Login or Register to Ask a Question
OSASCRIPT(1)						    BSD General Commands Manual 					      OSASCRIPT(1)

NAME
osascript -- execute OSA scripts (AppleScript, JavaScript, etc.) SYNOPSIS
osascript [-l language] [-i] [-s flags] [-e statement | programfile] [argument ...] DESCRIPTION
osascript executes the given OSA script, which may be plain text or a compiled script (.scpt) created by Script Editor or osacompile(1). By default, osascript treats plain text as AppleScript, but you can change this using the -l option. To get a list of the OSA languages installed on your system, use osalang(1). osascript will look for the script in one of the following three places: 1. Specified line by line using -e switches on the command line. 2. Contained in the file specified by the first filename on the command line. This file may be plain text or a compiled script. 3. Passed in using standard input. This works only if there are no filename arguments; to pass arguments to a STDIN-read script, you must explicitly specify ``-'' for the script name. Any arguments following the script will be passed as a list of strings to the direct parameter of the ``run'' handler. For example, in AppleScript: a.scpt: on run argv return "hello, " & item 1 of argv & "." end run % osascript a.scpt world hello, world. The options are as follows: -e statement Enter one line of a script. If -e is given, osascript will not look for a filename in the argument list. Multiple -e options may be given to build up a multi-line script. Because most scripts use characters that are special to many shell programs (for example, AppleScript uses single and double quote marks, ``('', ``)'', and ``*''), the statement will have to be correctly quoted and escaped to get it past the shell intact. -i Interactive mode: osascript will prompt for one line at a time, and print the result, if applicable, after each line. Any script sup- plied as a command argument using -e or programfile will be loaded, but not executed, before starting the interactive prompt. -l language Override the language for any plain text files. Normally, plain text files are compiled as AppleScript. -s flags Modify the output style. The flags argument is a string consisting of any of the modifier characters e, h, o, and s. Multiple modi- fiers can be concatenated in the same string, and multiple -s options can be specified. The modifiers come in exclusive pairs; if con- flicting modifiers are specified, the last one takes precedence. The meanings of the modifier characters are as follows: h Print values in human-readable form (default). s Print values in recompilable source form. osascript normally prints its results in human-readable form: strings do not have quotes around them, characters are not escaped, braces for lists and records are omitted, etc. This is generally more useful, but can introduce ambiguities. For example, the lists '{"foo", "bar"}' and '{{"foo", {"bar"}}}' would both be displayed as 'foo, bar'. To see the results in an unambiguous form that could be recompiled into the same value, use the s modifier. e Print script errors to stderr (default). o Print script errors to stdout. osascript normally prints script errors to stderr, so downstream clients only see valid results. When running automated tests, how- ever, using the o modifier lets you distinguish script errors, which you care about matching, from other diagnostic output, which you don't. SEE ALSO
osacompile(1), osalang(1), AppleScript Language Guide HISTORY
osascript in Mac OS X 10.0 would translate ' ' characters in the output to ' ' and provided c and r modifiers for the -s option to change this. osascript now always leaves the output alone; pipe through tr(1) if necessary. Prior to Mac OS X 10.4, osascript did not allow passing arguments to the script. Mac OS X April 24, 2014 Mac OS X