0
votes
2answers
32 views

Delete Directories that Contain Specified File in Mac OS X

How do I delete a folder that contains a file or folder with a specific name? E.g. I want to delete all folders that contain the file "things.txt": /dirA/ /dirB/things.txt /dirC/ /dirD/things.txt ...
0
votes
1answer
41 views

Change screenshot default name

How can I change the default screenshot name, to whatever I have written on Preview search tool at the time of the screenshot. As a function on terminal or as a script. Using OS X Mavericks. Thanks in ...
1
vote
2answers
174 views

Is it possible to grab and store the returned window id of a terminal opened through applescript or bash?

I have been working on this "dashboard" to help control my localhost server environment. It has been scripted in bin/bash for reference. I recently discovered I can use the bin command "osascript" to ...
0
votes
1answer
362 views

Use Automator for handling multiple file inputs through shell command in OS X

I tried to make an Automator drag and drop application but I'm totally lost. The script should use cat to join multiple audio files together. Steps: Read the selected finder files (which I drop ...
1
vote
1answer
47 views

Restarting multiple mac computers with terminal

How do you restart multiple mac computers that are on the same network with terminal? I know the ssh command to login to one computer but I want to be able to send a reboot command to multiple ...
0
votes
1answer
2k views

How can I set a static IP, gateway, net mask, and dns using terminal / applescript - OS X 10.7.5

I use my macbook at home and at work. At work I need to use a static IP, gateway, DNS and net mask. At home I use it in DHCP mode. Manually setting them every day really sucks. How can I set them ...
1
vote
2answers
1k views

Close all Mac Terminal windows, but the one running a script

I am trying to create a shell script that runs a python simulation programing in 4 terminal windows. I have the script that launches the program four times in four separate terminal windows(total of ...
2
votes
2answers
4k views

Open new terminal tab and execute script

I need to merge two osascript scripts, so that with one command I can open a new terminal tab and execute a script like echo hello into that new tab. This one opens a new terminal tab. osascript -e ...
0
votes
1answer
3k views

Running a command line app with sudo and password automatically on OS X startup

I need to run an app at startup/login on my mac. I want it to launch in the background and start doing it's work without interrupting me or me having to start it up because I invariably forget and ...
0
votes
1answer
3k views

How to zip multiple files into separate archives?

I admit this question was asked here before: Like Zip into separate files where the person who asked didn't specify the OS he used and received no answers. I need to separate a huge directory ...
4
votes
1answer
403 views

Way to switch F keys to 'application' keys and back on mac via terminal? (10.6)

Is there a command I can issue via terminal to switch my F1-12 keys to being application keys (media, screen brightness ...) and back? i.e. replicate toggling System Preferences => Keyboard => ...
0
votes
1answer
1k views

How do I close the terminal window after running a shell script from AppleScript?

I have created the following in AppleScript and although it works when I double click the compiled app, I am left with an empty Terminal window in the dock which seems to remain until I forcibly quit ...
1
vote
1answer
194 views

How can I pause growl notifications via Terminal/Shell?

I was wondering if there was a way I could pause (hide) growl notifications from the command line? Failing that, is there a way to do this with an AppleScript?
6
votes
2answers
6k views

How do I set up an AppleScript to open a new iTerm2 tab and change the directory?

In OS X, how do I set up an AppleScript to open a new iTerm2 tab change to a directory clear the console echo the current directory I had something like this before for regular Terminal, but I ...
-2
votes
1answer
3k views

If then statement using applescript in mac terminal?

What would be the code for: "If $foo is one, then $foo should now equal 18" ? Thanks
1
vote
1answer
1k views

Mouse movement vertical axis inversion? (Mac OS X)

I would like to either run an AppleScript or use a Terminal command to invert the y-axis for mouse movement in OSX— and no, not like http://d.pr/w9z7 (/joke). Any ideas? I thought about checking for ...
7
votes
2answers
4k views

Applescript to open a NEW terminal window in current space

Yes, I'm having a terrible newbie experience with Apple Script. I need to open a new Terminal window in the current desktop space. NOT move me to another space which has a Terminal running and then ...
2
votes
3answers
1k views

Get a list of all files and their attributes on OS X

What is the best and fastest way to get a list of every file on OS X including hidden and system files along with their attributes? I'm not afraid of the terminal or scripts, but if there is a ...
1
vote
1answer
856 views

Applescript: Check if shell command fails?

I'm writing an AppleScript to watch a folder for completed downloads, then process them. If I'm downloading a file split across partial RARs (.r01, .r02, … God I hate those), they'll enter the ...