An automated series of instructions carried out in a specific order, such as a Windows script created to launch a specific program on startup.

learn more… | top users | synonyms (1)

4
votes
1answer
1k views

Using launchd to kill and restart Finder in OS X

I'm trying to use a launchagent on login to kill the Finder, and then re-launch TotalFinder, to automatically apply the colorsidebar mod for OS X 10.7 (the mod can be found here). If I use the ...
4
votes
3answers
9k views

How can I manually load/unload a driver in Windows Vista?

I think one of my drivers is causing some of my Windows Vista machines to boot extremely slow. Since the perf log is basically no help, I want to try manually unloading/loading drivers to see if ...
4
votes
3answers
6k views

Is there a way to get access to a window handle in windows using WSH, or WMI or similar?

Is there a way to get access to a window handle in windows using WSH, or WMI or similar? I just want to flag a window as always-on-top. Ideally I'd use windows script host for this. (Should also be ...
4
votes
2answers
529 views

How to invoke actions from an executable in PowerShell?

I am using Powershell 2.0 on Windows 7 SP1, but any answers covering versions 1.0-4.0 would be nice. I know that this command opens Paint via PowerShell: & "C:\Windows\system32\mspaint.exe" ...
4
votes
3answers
4k views

Howto start an interactive script at ubuntu startup?

Based on Ubuntu core 12.04, I have prepared a bootable DVD. After booting (to console only), I can login as a user and start a script for installation of an embedded device: sudo install_script In ...
4
votes
1answer
3k views

How can I execute a script each time I log in and out from OS X?

What I want is to send a URL with variables to a server which will track when someone is present based on when they login and logout of their workstation. I've tried setting the LoginHook in com....
4
votes
1answer
118 views

Extract data from an online atlas

There is an online atlas that I would like to extract values from. The atlas provides a tool ('Query') to extract values when you click a location or enclose a region on the map, or you can specify ...
4
votes
3answers
238 views

Delete all files in folder except those with certain prefix

I have a folder being filled with auto generated files by an application. There are csv and png extensions being created and stored in there. We need to delete all files in the folder except certain ...
4
votes
1answer
2k views

Unlock PC with Windows Task Scheduler

I need to set up a Scheduled Task to unlock Windows 7 PC at specific time. And second Task, to lock at other specific time. Is this possible by cmd.exe command, or I need to use some third party ...
4
votes
1answer
265 views

How can I automate some simple steps within the GIMP?

I'm trying to use GIMP to automate 3 actions upon a user defined selection in the currently active image - Grow selection by 2 Add border to selection (width of 2, with feathered edges) Fill the ...
4
votes
1answer
3k views

How to call a cmd on a remote server without having the absolute path

I would like to call a cmd (let's call it x.cmd) on a remote server. The x.cmd will return a log file in a log folder. Problem is this log folder in x.cmd doesn't have an absolute path (just a ...
4
votes
1answer
89 views

Quick way to find out how much silence is at the start of an MP3?

What's a quick and easy way to find out how much silence is at the start of an MP3? I know there's a lot that goes into that... I don't need anything too precise. Within 50 or so milliseconds is great....
4
votes
1answer
3k views

Shell script - bad interpreter: Operation not permitted

I put the below script in a file called "volume", and put that file in a folder within $PATH. I can execute it fine by "bash thatpath/volume 10" but when I try to execute it using just "volume 10" ...
4
votes
0answers
494 views

VPN on-connection scripting

I use a VPN to connect to the office from home. I use Windows XP's built-in VPN support for this. Due to some unfortunate subnet choices, I must run a script to set up some network routes every time ...
4
votes
0answers
847 views

Python and Google Sketchup

Is there any way of scripting Google Sketchup using Python rather than Ruby? I have had a look at SuPy but unforturnately I'm working with Python 2.6 rather than Python 2.5 which SuPy appears to ...
4
votes
1answer
7k views

Install a Teamviewer host silently with custom password

Our company has the custom Teamviewer hosts that we can run silently with the /S switch. The issue is that we can't connect due to it not setting a password that we know. Does anyone have any thoughts ...
3
votes
3answers
5k views

Is there a way to run Javascript without a browser, like a shell or batch script?

Is there a way one could run Javascript the way Python, Bash, Windows Batch or other scripting languages are run? File access and other library functions would be nice but are not required - I'm just ...
3
votes
3answers
10k views

Run a remote script/application in detached mode in Ansible

I am having trouble running a remote application startup script "detachedly" from an Ansible playbook. The script will run, but I can't get it to get/stay detached. I am probably doing something wrong,...
3
votes
5answers
1k views

How do I flip the line orders of a document with 500+ lines?

Line 1 Line 2 Line 3 Line 4 Line 5 should become Line 5 Line 4 Line 3 Line 2 Line 1 I need a notepad script to do this.
3
votes
6answers
708 views

Physical button to run scripts on a Windows machine

I frequently come in contact with people who absolutely cannot operate a PC, no matter how much training they get. I need some sort of programmable physical button or remote control that executes a ...
3
votes
4answers
19k views

Verify that a cron job has completed

Is there a command that can be run to verify that a users cron job has run successfully? Platform is Ubuntu 8.04 LTS. I have scripts in /home/useraccount/bin/ running crontab -l while logged ...
3
votes
4answers
3k views

In linux how do I to get ' quote ` back-tic through the shell into sed.

In linux how do I to get the ascii decimal/hex/oct code from a char or a ascii char from a decimal/hex/oct code. I see from the gnu sed user manual that I can use the \d# \o# \x# to specify a ...
3
votes
4answers
9k views

Downloading a RAR file from Mediafire using WGET

Example: http://www.mediafire.com/?tjmjrmtuyco This was what I tried... wget -A rar [-r [-l 1]] <mediafireurl> That is to say, I tried with and without the recursive option. It ends up ...
3
votes
2answers
6k views

Is it possible to autocrop black borders of a video with ffmpeg?

I think it has a "blackness" video filter, which can determine if a picture sequence is black. Maybe it also has a filter to determine crop values automatically to remove black borders form edges of a ...
3
votes
7answers
3k views

UNIX find dirs that contain a particular file (pom.xml) then execute command in that dir

I want to, from a root dir, find all dirs that contain a certain file name (pom.xml), then cd to that dir and execute a command. I can do this in a script but I was hoping to do this with a single ...
3
votes
3answers
782 views

How to execute a second condition if the first condition is true in Linux shell scripting

I have an if condition. If that condition is true then one script will be run and after that I need to check another condition. How can I do that using an if statement or something else? For example,...
3
votes
3answers
1k views

difference between ${} and $() in shell script

$ echo $(date) Thu Jul 2 16:33:11 SGT 2015 $ echo ${date} $ name=foo $ echo $(name) ksh: name: not found $ echo ${name} foo Seems like ${variable} is the same as $variable. while $() is to ...
3
votes
4answers
574 views

On Linux or Windows, how do I find the path for all mp3s that are the only mp3 in that directory?

I have a Music folder and the contents look like this: Music     -ArtistA         -Song1....
3
votes
2answers
138 views

Very Simple Script to Remove Last 5 Lines of a Series of Text Files

For some reason this script outputs three files for each original, rather than one. Must have made some trivial error - I'm new to this! Much obliged if anyone could explain why this happens. ...
3
votes
4answers
2k views

Change shortcut targets in bulk?

I have hundreds of shortcuts to websites where the target looks like this: C:\Users\Herb\AppData\Local\Google\Chrome\Application\chrome.exe www.somesite.com/foo I just upgraded to Windows 8, and ...
3
votes
2answers
2k views

Bash prefix string with tilde to expand to home directory

I can't figure out how to prefix a string (e.g. "user1") with a tilde (~) to produce ~user1 and have that expand to user1's home directory. Here is what I have now: USER="user1" ls ~${USER} ls: ...
3
votes
4answers
2k views

sudo displays typed password in bash script

I have a bash script that uses sudo a few times. There's a couple of strange points about it though. It asks me for my password a few seconds after I've already entered it for a previous command. ...
3
votes
2answers
37k views

Automate file upload in FileZilla using a script [duplicate]

Consider: D:\Program Files\FileZilla FTP Client\filezilla.exe -c 0/GG/DG/ -a "K:\YY\XXXXX\AAAA\BB\idS.txt" This code doesn't work as it says: "PATH NOT FOUND" K:\YY\XXXXX\AAAA\BB\idS.txt ...
3
votes
2answers
5k views

Replacing /bin/bash with /bin/false in /etc/passwd file

I am writing a program to disable users from a system, i want to replace /bin/bash to /bin/false. Example xxx:x:1:22:xx:/export/home/xx:**/bin/bash** replace to xxx:x:1:22:xx:/export/home/xx:**/...
3
votes
4answers
10k views

Accessing a remote mounted directory from Windows CMD.EXE

I have a remote directory that is shared and mounted to my localhost. I know the remote directory is mounted and shared correctly as I can read, write, execute the file during a normal mouse and click ...
3
votes
3answers
4k views

Mac OS X script to change display resolution

Is it possible to change display resolution in Mac OS X? If so, how?
3
votes
5answers
2k views

How to run a bash script outside of a terminal?

Hey All, wrote this script to confuse my girlfriend when she is using my computer. The only trouble is that if the terminal gets closed the script stops to execute. It currently executes in the ...
3
votes
5answers
19k views

How to use crontab to run a script as nobody

This is on a CentOS machine. I'm trying to run a script as user nobody (or as a user with minimal permissions) at a certain time every day. Here is nobody: [root@CentOS % ~] grep "^nobody" /etc/...
3
votes
2answers
4k views

Run A Script When Connected To A Wireless Network In Linux

Is it possible to have a script run when I connect to a wireless network? My university hijacks all HTTP(S) connections when you first connect to force you to log in with your university account. I'...
3
votes
2answers
15k views

Powershell script to list scheduled tasks on remote systems

I want to write a PowerShell script that lists all Scheduled Tasks on remote systems, and includes the user account which will be used to run each task. The local system is running Windows 7, with ...
3
votes
1answer
9k views

SSH could not create directory /home/USERNAME/.ssh

My script is executing the below command: command = os.system('rdiff-backup --exclude "**.dropbox**" --exclude "**.ini**" --remote-schema "ssh -o UserKnownHostsFile=/cygdrive/c/Users/Adam/.ssh/...
3
votes
3answers
5k views

Run python script from Finder rather than edit?

Max OS X. When I double-click on a python script it opens in the default editor. How might I make it so that when I double-click, or choose the script from Applications, it executes from the python ...
3
votes
1answer
5k views

In TextWrangler for Mac OS X, how to change the selected text to lowercase using a keyboard shortcut?

I know how to use the menu to change case, but I want it to be a keyboard shortcut. Other text editor have this feature but I would prefer to stick with TextWrangler. Does one already exist or is ...
3
votes
1answer
11k views

How can a PowerShell script be automatically run on startup?

I have a PowerShell script to monitor an image folder. I need it to run automatically on startup. I tried to use MSConfig, but I could not find it in that list. How can I have the script ...
3
votes
2answers
1k views

Change the OSX system language in a script

Manually I just go into the system preferences, change the language ordering, and restart my app so it starts up in the default system language. Then I can run automated tests with the app running in ...
3
votes
2answers
2k views

Set one homepage for all browsers simultaneously

For testing purposes, I would like to set the homepage of all browsers installed on my computer — Internet Explorer, Chrome, Firefox and Safari — to the same page. I'd like to do this all ...
3
votes
3answers
4k views

How can I take hundreds of smaller images and create one big tiled image?

I have 251 images that are 128x128 in size; I need to create one big image that includes them all tiled together. The image will be 32128x32128 in size if all goes well (Paint.NET says it will be 3....
3
votes
3answers
29k views

How do you update an Excel file (Data Refresh and update formulas) WITHOUT opening the file?

I have an Excel file that want to update and save automatically with out having to open it or manually interact with. Manually, I open the file up and hit data refresh which goes and does a SQL query ...
3
votes
1answer
322 views

Force a bash script to run to completion where some items may stick

I've a Uni assignment I'm building that I need to run multiple times with multiple different parameters to check run times. At the moment I've a simple bash script that looks a little like the below - ...
3
votes
2answers
115 views

How to get latest version string from a collection of folder where folder name is version string

for folder structure like below RootFolder | |--1.2.3 |--1.2.4 |--2.1.3 ... ... ... Under RootFolder, there are a collection of folders, and they all named with ...