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)

0
votes
0answers
4 views

a scripting language to compare rows of web search

a scripting language to compare rows of web search like this! i want to compare between arrival and departure time difference for example a websearch in irctc
1
vote
1answer
14 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
39 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
22 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
35 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
28 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
24 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
267 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
39 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
10 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
48 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
100 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
25 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.
0
votes
0answers
12 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 ...
0
votes
1answer
60 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
20 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
25 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
60 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 ...
0
votes
1answer
28 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
21 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
206 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
51 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 ...
0
votes
2answers
88 views

script copy sender(s) email address only to the clipboard

I am a blind voiceover user of mac. The new Mail.app makes it difficult to copy the sender's email. I would like to have a script which copies the sender email only, of one or more selected ...
1
vote
1answer
67 views

OS X application start/stop hook

How can I have a script automatically ran when I start or stop an app without using 3rd party tools? I'm not developing the application myself, it's a general question that applies to any installed ...
-1
votes
1answer
28 views

Seeking shell-scripting resources for the visual learner

I'm trying to teach myself shell scripting. I understand things best when I see them in the context of a system, especially when I can visualize that system. I'm looking for a visual companion to ...
1
vote
0answers
36 views

Correct Way to Check if Spotlight Has Indexed a Folder's Contents

Okay, so I've written a script that uses mdfind to more quickly match files, however, I need to find the best way to check whether a target directory is indexed or not, so I can fall back to using ...
1
vote
2answers
43 views

Forcing a script to run in english

My Mac is running Mavericks in English, but because my region is set to Portugal and my keyboard is the portuguese one, when I run some scripts they shows messages in portuguese. I generally hate to ...
1
vote
1answer
165 views

Setting a firmware password

Currently trying to use a script (preferably shell) to setup the firmware password on a fresh OSX install. I obviously found this: http://osxdaily.com/2014/01/06/set-firmware-password-mac/ which ...
2
votes
3answers
695 views

How to launch browser in iOS Simulator from command line?

I want to launch the browser in iOS Simulator from the Terminal with specified URL. Is there any command for it? So that I can write in a script which will take URL as argument and launch simulator ...
1
vote
2answers
141 views

Running a bunch of commands in Terminal

I run the following commands for logkext a lot in my terminal and would like a know a way to automate the whole process. Open terminal type "sudo logKextClient" Type in administrator password ...
2
votes
1answer
46 views

Execute Shell Scrip individually for each selected file in Finder

I am trying to create an automator workflow that will do a google search for the filename of each selected file in finder. Unfortunately the workflow I have created works just with one selected ...
1
vote
0answers
35 views

How to change audio output according to display state?

I've got a Mac Mini connected to a TV via HDMI. I would like to have the audio output device changed automatically to external speakers if the TV is turned off. I can imagine that this feature is not ...
0
votes
0answers
10 views

Is it possible to send a badge notification to an arbitrary application (as if from a shell script)?

I'm still not sure how I'd keep track of it (the API makes it seem like you can't just say "add 1 to the current number"), but is this even possible? I thought terminal-notifier have such an option, ...
0
votes
0answers
73 views

Notification message's delay before hide

I made a script to upload images, it shows a notification, but it stays on screen for a very long time until I close it by click. Is there a way to decrease the delay for this notification?
1
vote
2answers
83 views

How to make a message appear on the screen?

I'm trying to set up a kind of intercom system between Mac, Windows, and Linux boxes at home. Question: How can I make an arbitrary message appear on the graphical screen of Mac OS X? For instance, ...
2
votes
1answer
1k views

Full privileges on .command file, but it says I don't have appropriate privileges

I have a command that I regularly need to run in the Terminal (for application code signing). Normally I launch the Terminal, press the up arrow until I reach the command I want, and then hit enter. ...
5
votes
5answers
771 views

OSX Bash for loop - issues with spaces in folder names?

I'm getting a bit confused on how to handle spaces in path names when returned in a for loop. Rationale: I'm cleaning up the permissions on folders and files that I copy over from Windows. Most of ...
0
votes
2answers
2k views

How Do I Use 'cp' to Overwrite Files?

Using a shell script or Terminal, how do I overwrite files that may or may not be present. I looked at man page for cp, it said use the -f argument to force overwrite. But, it does nothing. $ cp -f ...
0
votes
1answer
157 views

How do I create a script to create/modify local admin accounts?

This question is almost exactly what I need for my project at work. We have approx. 400 Macs on our campus, and the problem is they were not all set up identically. There are at least 4 different ...
7
votes
2answers
165 views

How can I run a script when the room brightness has changed?

How can I run a script when the room brightness has changed? In particular I want to run a script when the lights have been turned off in the room that my Macbook is in.
0
votes
0answers
24 views

Log time and battery percentage on charger disconnect

Is there any way to create an event or a script that will log the current time and battery percentage each time the charger is connected or disconnected?
1
vote
2answers
237 views

Hidden login script

I have a bash shell script that runs on login. Even though I selected the "hide" checkbox in system preferences, iTerm still shows while running it. How do I completely hide it?
0
votes
0answers
55 views

How can I open a URL on connecting to a specific wifi network in OS X?

Some wifi networks require logging in through a browser after connecting, in order to gain internet access. In many cases it is possible to log in by opening a specific URL without having to click ...
0
votes
1answer
18 views

Change Modifier Key While Application is frontmost

What I'm trying to accomplish is to intercept or change Command and replace it with Control for use while another application is running and frontmost. Is there a way to temporarily change modifier ...
1
vote
1answer
87 views

Unable to create a working .app executable using Platypus

I'm new to OS X and I'm trying to create an application wrapper for a shell script that starts a media server(Red5) I'm trying to wrap the Red5 server starter script (red5.sh) into an .app executable ...
2
votes
0answers
174 views

How to run a shell script upon user authentication (e.g. screen unlock)?

I would like to specify a shell script (say one to send me an email) whenever a given user is authenticated, for example if prompted after sleep, fresh login or fast user switching. PS: I found ...
2
votes
1answer
870 views

Trouble in Automator's Shell Script after OS X 10.9 Mavericks upgrade

I've got a problem. I use from lot of time an Automator's shell script: cat >> ~/Dropbox/ClipBoard/Appunti\ Mac\ del\ $(date +\%Y-\%m-\%d).txt It ever worked but, after Mavericks upgrade, ...
0
votes
1answer
62 views

SIPS: Only Resize if Image is 315x300?

I'm currently using sips --resampleHeightWidth 250 300 "S1" to resize new images in a folder but I think that it might be resizing images that were already resized.. Is there anyway to know this for ...
2
votes
2answers
474 views

Run script before restart/shutdown

Is it possible to execute a script/command right before OS X is shutting down or restarting? I'd like to run sudo apachectl stop to stop apache from auto-starting.
0
votes
2answers
150 views

Cross-Platform alternative to expr length

When running some BASH scripts I had in my Linux box I noticed that expr length gives syntax error. Manual pages doesn't seems to include any information about the length operator. Is it missing in ...