A collection of commands that may be from a CLI Shell, or programming language such as AppleScript, which are executed in order with limited iteration, usually as a way of automating actions or events.

learn more… | top users | synonyms (2)

2
votes
4answers
102 views

Shell script help

I am new to writing shell scripts for Unix and need a little help. I am not sure why cURL now all of the sudden after running the script is downloading corrupts packages which cannot be mounted and ...
0
votes
0answers
13 views

Apple installer issue in terminal where -target keeps saying; error cannot find Volume

I am trying to use the Apple Installer commands to install a package and the output is that it was successful, however, the end result is that nothing actually happens meaning the package never gets ...
0
votes
0answers
6 views

Switching “TrackpadMomentumScroll” on and of using a script

I'd like to switch the accessibility preference "Scroll with inertia" on and off for a Magic trackpad. The preference can be found in the accessibility preferences/Mouse and Trackpad/Trackpad ...
1
vote
1answer
44 views

Why does this bash script not work as an automator service?

I know very little about bash scripting or Terminal commands, this is all very new to me so please bear with me. Original script I would like to use a script I found on littlefield.info as an ...
0
votes
0answers
21 views

Output being produced during shell script [closed]

#logFile="$HOME/logfile.log" #relevantfile="$HOME/test_file.txt" #grepCustomer=`cat $relevantfile | awk '{print $9}'` #user=`cat $relevantfile | awk '{print $3}'` #changeUser=`cd */$user` ...
0
votes
0answers
17 views

I need a background process which redirects a link based on whether or not an external hard drive is connected

Basically I have two iTunes libraries. One is my complete iTunes library which I store on my external hard drive. The other is a smaller version that I keep locally. I want to have a symbolic link ...
1
vote
2answers
13 views

How to make certain keystoke in AppleScript?

I am trying to make a program that records a live stream for a certain amount of time and then saves it on my desktop. This is what I have so far. TWiT Live Recorder (30 sec version) tell ...
0
votes
1answer
31 views

How to iterate through multiple file extension without caring about case sensitivity?

I've seen various topics on how to iterate through multiple file extensions, but in most cases the list is defined. example: for file in ${arg}/**/*.{txt,h,py} do .... done As can be seen, ...
1
vote
2answers
31 views

How to run a script from Alfred or Spotlight or any run dialog?

Coming from Linux I am really missing the good old gmrun -- a run dialog which recognizes your $PATH and allows you to execute any script in it without needing to open up a terminal. It does the job ...
1
vote
1answer
68 views

Execute simple script

I wrote the following very simple script: route -n add 192.168.0.0/20 192.168.224.1 route -n delete 0.0.0.0 route -n add 0.0.0.0 172.20.10.1 And would like to just double click it and you ...
0
votes
1answer
43 views

Banning domains temporarily from local access

I need to control myself. So far, I was using a Windows device for work, where I would simply reroute Facebook, news sites and similar to 127.0.0.1. In near future, I will have to use the same device ...
2
votes
1answer
40 views

Exponential Slowdown of Applescript

So I've been working on a simple AppleScript to try to help with managing my e-mail in OS X's Mail, and I have it seemingly working just fine with one major problem; the performance of the script is ...
2
votes
0answers
22 views

Run script when I connect something to the line in port?

I'm connecting my phone to my mac via the line in port to listen to podcasts. I'm using the app LineIn to do this and I was wondering whether there was anyway I could have: My audio input be set to ...
0
votes
1answer
34 views

How do I get system_profiler output from a lot of machines in a network?

I need to have a script that will execute "system_profiler -detailLevel full" command in a remote mac machine. While this is going on, the user on the remote machine should not know that there is ...
1
vote
1answer
48 views

Automate mobile terminal?

I have a jailbroken iPhone. I use it to reboot my router when my wifi is going slow or messing up. But I'm lazy and I was looking for a way to automate the process. I use shortcuts that mobile ...
1
vote
1answer
36 views

AppleScript to find and delete a folder inside an FCPX library

I need to write or find a simple script to find, select and move to trash, folders within a Final Cut Pro X library. Because these libraries are bundles you can't search them in the normal way. What ...
3
votes
1answer
380 views

What is an alternative to a BAT file on Mac?

What is the alternate for BAT file (Windows) on Mac? Does different version of OS X have different format of BAT files? I am trying to create a BAT file on Mac which normally changes directory while ...
1
vote
1answer
107 views

Double click in AppleScript

How do you write the command to carry out a double click with a mouse at a specific location in AppleScript?
0
votes
0answers
18 views

Tagging/organizing based on keywords in content

I have a series of markdown files with YAML headers, let's call them A, B, C, D, and E. I need to organize them into "binders," where each binder is some subset of these, for example: Binder alpha ...
0
votes
2answers
40 views

Wiping all content under /Users but admin

We have hundreds of computers with LDAP setup and when students login their profiles remain for life. IS there an easy script or something that could be run to clean out the entire /Users directory ...
0
votes
0answers
44 views

Need Apple Script to redirect work mail - Mail rules don't work

I have to use MS Exchange at work for email, so I have Outlook and Apple Mail set up. I want to use Gmail but POP is disabled for us, so I can't just pop it to gmail. So, I tried setting up a rule in ...
2
votes
1answer
68 views

Shell scripting: Why does only the “-” hyphen throw an error?

Goal: Cleaning up Selectively truncate filenames in my nvALT notes folder. I tried using a productivity blogger's suggestion (which eludes me after a thorough search) to prepend ^ > - + to ...
3
votes
3answers
136 views

Shell scripting: Select folder based on part of file name

My project I'm creating a bash shell script to execute from the Terminal. Its purpose is to archive lots and lots of project folders. Each folder follows a prescribed nomenclature: [YYYY.MM.DD] - ...
0
votes
1answer
104 views

How run a .py (python?)-script in Xcode?

Hi I got the complete code, but I don't know how to run the script. The script is some plot of a function, can one run the script so that the plot is shown in xcode?
4
votes
2answers
152 views

Add and remove multiple tags at once from a file or a folder

Using OS X Mavericks I want to add multiple tags at once to a file or a folder and I also want to remove multiple tags at once. There are different ways to add tags to a file, one of them would be to ...
2
votes
1answer
62 views

Invalid Argument using ditto

I'm using a backup script on my server that uses ditto and I keep getting the following error: ditto: /Volumes/BKP/Daily_bkp.051114/VM Share/Machine/Backups/backup_copies.cmd: Invalid argument This ...
2
votes
1answer
243 views

How does this complex BASH shell script work?

Apple Support Community member Linc Davis developed this command to aide in diagnosing issues. The output gives a general overview of one's system and is very similar to the program etrecheck. But, it ...
5
votes
6answers
647 views

Create a new (.txt) File in Finder - Keyboard Shortcut

I wanted to know if there is way to set keyboard shortcuts to make new files in Finder. For example, by default, you can create a new folder using CMD+Shift+N. Is there a keyboard shortcut to create a ...
0
votes
1answer
137 views

Script / Automator for conversion of Apple Works docs to .odt docs

With about 2500 AppleWorks docs, dating back to 1995, which I cannot open in the newly purchased Apple Pages ( but with LibreOffice), I need a script or some other automation to do it. (Most of the AW ...
1
vote
1answer
574 views

need to script connection to telnet and send commands to remote device with no user input

Ok I need some help making a script that will connect to a server and send 2 commands Ideally I would have telnet 192.168.2.230 9993 and once it logs in (no user name or password required - the ...
1
vote
1answer
88 views

Script to check Software Version

Hi i'm tryin to write a script to check software version. I want to pass my own variables, which are name of the Application and Version. Here's a copy. It's not working for me currently... i'm a ...
1
vote
1answer
32 views

How can I run a application in Automator?

I want to run an application in Automator but there is no run program. Operating system and stuff: OS X Lion 10.7.5 Automator 2.2.4 Memory: 3GB
1
vote
1answer
293 views

AppleScript To Manipulate VLC

I want to do a script, that it can launch VLC player, and in VLC player "Open a file", then "Select a folder", then click on "add" then "play" it. I think that Automator can't do this. But ...
1
vote
1answer
93 views

Bash script to run command with prompt for input

How can I create a script using the following command? mmap -sn -n x.x.x.x/8, /16, /24 and so on. I would like the script to run the command when I type in "sweep" and then prompt me for the subnet ...
2
votes
0answers
42 views

How can I tell programmatically whether a process is in app-nap?

I'm looking for a script, built-in shell command, or program (with sources) that can tell me whether a process is in App-nap mode or not. I want to use it in automated testing, for profiling and to ...
2
votes
2answers
2k views

Way to logout a user from the command line in OS X 10.9

I want to logout my Mac OS X from the command line. My OS X version is 10.9. I tried command pkill -KILL -u uid, but this command didn't work out. Is there a command that can be used to log out a user ...
1
vote
1answer
62 views

skill -KILL -u $user Command on Max OS X?

Is there an alternative for the skill -KILL -u $user command on the Mac OSx. The basic requirement is I want to log out my current logged in user at end of shell script This program logs out Linux ...
1
vote
0answers
21 views

Logs for checking establishment and disconnect of mac user remotely

I am using Vine VNC Server in Mac OS X for accessing my desktop remotely. I want to fire two scripts: One at establishment of the VNC connection One at disconnection of the VNC connection I ...
0
votes
1answer
120 views

how to use terminal to remove item from dock

Hi I have a shell script in my login item , which runs whenever i log in to my system . It does work completely but once it exits the terminal , it leaves the terminal shortcut on my dock and I don't ...
1
vote
1answer
497 views

How to make a playable DVD iso from a VIDEO_TS folder?

I used to have a script that converts a VIDEO_TS folder into an ISO that plays ok in VLC but it's gone. Anyway, this command gets me most of the way there: hdiutil makehybrid -udf -udf-volume-name ...
1
vote
1answer
36 views

Delete folder with specific condition

I need a script to delete a folder, only if the folder does not contain media files with extension avi or mp4.
1
vote
1answer
21 views

Where are the actions stored that the Contacts.app can apply on telephone numbers?

When I click on a telephone number in Contacts.app (or more precise: on the word left of it) I get to see the following menu: Where does Contact.app store these actions? I couldn't find anything in ...
1
vote
2answers
98 views

How can you set up a free, universal OS X-wide ‘autosave’ script?

I want to set up a free solution in OS X for a universal ‘autosave’ function (given Apple’s own solution is limited to only a few apps - at least for now), and let Dropbox do my file versioning and ...
0
votes
0answers
24 views

What scripting framework could work with google translate for a non-programmer?

So I want to create a small workflow that I can integrate into my OS that does this: Translate selected sentence with google translate (fixed languages) and make it automatically get pasted where I ...
1
vote
2answers
33 views

Keyboard shortcut to CLI executable

I have a couple CLI utilities I would like to map to key combinations. The scripts take no parameters, I merely need to invoke them. I've seen how to create keyboard shortcuts to apps, but can I ...
0
votes
1answer
150 views

Move files to individual folders, using file name as folder naming convention for folder, using Terminal

I've been looking for answer on the web now for a few hours and can't find what im looking for. What i want to do is move each file in a directory to a new folder using the name of the file, excluding ...
1
vote
1answer
42 views

How to script a logout while screen is locked?

I want to log out a user via a shell script, after a delay. However, there's a few other issues: User does not have admin and/or root. Logout must complete even if screen is locked. Currently, I'm ...
0
votes
0answers
23 views

Automatically copy PDF.plugin to Chromium.app

I'm using Chromatic.app to update my Chromium.app recently. I'd like to use Chrome.app's PDF.plugin in Chromium.app. Therefore I need to copy PDF.plugin to the following directory: ...
2
votes
2answers
306 views

Does Mac OS X's bash read scripts for all users (tab-completion scripts) from /opt/local/etc/bash_completion.d path?

I stumbled upon some instructions in the book "Pro Git" It suggests: Download this file : https://github.com/git/git/blob/master/contrib/completion/git-completion.bash If you use the Bash ...
0
votes
1answer
91 views

What is the proper way to use the cut command on ps command output

This question is related to a question I posted on rogue firefox procesess. It relates to firefox processes following image uploads that I have been having for a while. I am trying to get to the ...