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)

24
votes
2answers
14k views

How to launch a command on network connection/disconnection?

I have a wifi connection that requires to authenticate using a web form once the wireless link is established. I know how to automate the authentication with a script that uses curl/curlIE. But how ...
41
votes
6answers
11k views

What is the difference between executing a bash script and sourcing a bash script?

What is the difference between executing a bash script like A and sourcing a bash script like B? A >./myscript B >source myscript
80
votes
13answers
35k views

How to execute a command whenever a file changes?

I want a quick and simple way to execute a command whenever a file changes. I want something very simple, something I will leave running on a terminal and close it whenever I'm finished working with ...
31
votes
8answers
56k views

How can I run an application with command line arguments in Mac OS

Is there any easy way to append command line arguments to an application on a Mac? For example, to run Opera in kiosk mode or to use a different profile in Firefox, I can type $ ...
30
votes
11answers
50k views

Which command can I use to recursively rename or move a file in Windows?

What command in Windows emulates the recursive move / rename command from Unix?
11
votes
4answers
25k views

Automatically run a script when I log on to Windows

How can I automatically run a script when I log on to Windows? I'd like to run this whenever I log into my computer: echo %USERNAME% logged on at %DATE% %TIME% >> log.txt A bonus would be to ...
11
votes
3answers
17k views

Change DNS with script

I need to frequently change the DNS server address, and for now I do it by opening 'network and sharing center' - 'local area connection' - properties - ipv4 - and then type the DNS numbers. Is there ...
3
votes
3answers
1k 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 ...
11
votes
3answers
9k views

Create a logoff script/task for Linux

In similar vein to my question for Windows and Mac OS X, how would one go about creating a logoff script for Linux? Any distro is fine, as I'm sure it'd be extendable across others. I'm most ...
47
votes
11answers
15k views

Add directory to $PATH if it's not already there

Has anybody written a bash function to add a directory to $PATH only if it's not already there? I typically add to PATH using something like: export PATH=/usr/local/mysql/bin:$PATH If I construct ...
29
votes
8answers
34k views

How can I get a script to run every day on Mac OS X?

Cron? Launchd? iCal?? If so, how?
6
votes
1answer
11k views

Set Permanent Environmental Variable in Windows XP

I want to set environmental variables permanently through a batch file. Is there a command to set Permanent Environmental Variable (other than SETX) for Windows XP service pack 3? command SETX ...
10
votes
4answers
2k views

Move some iTunes library items to different drive?

My internal hard drive is somewhat small, and I only regularly listen to a fraction of my iTunes library anyway, so I'd like to keep large portions on it on an external drive for archival purposes. ...
16
votes
5answers
3k views

Good PowerShell guide, getting started through more advanced usage

Does anyone have a really good tutorial or getting started guide for Microsoft's PowerShell? I'm a long time Linux/Unix user, and very familiar with scripting languages, command-line usage with bash, ...
5
votes
2answers
9k views

How to list manually installed software packages in Ubuntu? [duplicate]

Possible Duplicate: How do you track which packages were installed on Ubuntu (Linux)? Hello, I'm using apt-get install to install various software on my PC. I have a handful of PCs that ...
7
votes
8answers
25k views

How to get my external IP address (over NAT) from the Windows command-line?

The Windows "ipconfig" command can only show me the parameters from the Ethernet interfaces from my machine (even with the ipconfig /all argument). It can show detailed information about the ...
6
votes
3answers
20k views

How do I change automatic logon via Script or Command Line?

After deploying a Windows 7 image to Stand alone machines we run into the following problem. If we set autologon to off then we have to log in manually and activate Windows and Office - the Keys ...
5
votes
2answers
2k views

How to extract a complete list of extension types within a directory?

Within a directory, and recursively within it's sub-directories, meaning every directory within a directory is processed, how do I compile a complete list of unique extensions within the directory? ...
10
votes
3answers
2k views

Calling a script with ./bla.sh vs. . bla.sh

Can anybody explain to me what the shell does in the two examples A) and B) below? It obviously behaves differently, but I can't find out why the output is different. Example: Let's have a script in ...
4
votes
2answers
9k views

How can I delete rest of the line after a specific string?

I'm looking for a way to search for a specific string e.g. '=UUID:' and delete it and all following characters per line. I would prefer a way/macro/addon for notepad++. But all other tools or scripts ...
4
votes
6answers
2k views

Dos and/or Windows versions of Unix SCRIPT command

Back in university, when we had to submit an assignment in CS, we would have to perform a series of steps including running script, date, whoami, etc., and then running our program. The script ...
3
votes
1answer
2k 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 ...
3
votes
5answers
11k views

Batch file to replace a single character in Windows filenames

I have a Windows Server 2003 server that has a whole bunch of filenames that need renaming. Basically, I just need all - (hyphens) replaced with _ (underscores), no matter where they are in the ...
2
votes
2answers
706 views

Permission Denied running python script from samba share

I'm trying to mount a samba share on a Ubuntu 12.04 desktop from a Fedora 17 desktop. I can create, edit and delete files with no problem but when I try to run python scripts on the share i get a ...
2
votes
3answers
1k views

Script to clean up folder names

I have a lot of folders that need to be renamed based on couple rules. example of folders: -- Some.Folder.Name.Today.2009 -- Another.messed.Up.folder.1980 -- Third.messed.Up.folder.1980 I would ...
2
votes
1answer
5k views

Create a logoff script/task for Mac OS X

Related to my other question on Windows, how would one go about creating a logoff script for Mac OS X?
-13
votes
2answers
11k views

How can I run a web page in task scheduler every day? [duplicate]

Possible Duplicate: How can I open a URL on a schedule in the default browser? Tomorrow I will go holiday and I can't connect to internet for 5 days. In my SO account I have 64 consecutive ...
4
votes
3answers
594 views

How can I receive phone calls on a Linux server and script stuff depending on the numbers pressed?

I live in France and the ISP I've subscribed to provides a regular phone line along with my Internet connection. Here's a simple schema of my setup: Since I don't use this phone line I would like ...
4
votes
3answers
3k views

Run script on Windows every n minutes

What's the best way on a Windows machine to run some sort of script every n minutes? I've googled around and read that Windows Scheduler is best avoided.
4
votes
2answers
2k views

Sending mail from the command line, in an automated way

I want to be able to send a text file through an SMTP server of my ISP (port 25) to an email address on the internet, like my Office email address, or my GMail address. I have a basic Ubuntu 9.04 ...
3
votes
4answers
7k views

Input Error: There is no script engine for file extension “.vbs”

I keep getting it in command prompt, any idea why and how I may resolve the issue? Windows 7 Ultimate 32-Bit
2
votes
5answers
3k views

Problem with running a script at startup as root?

The main question: Is there a way I can run 'completely' one of my script when ubuntu's desktop appears no matter if root , administrator, desktop user or an unprivileged user logged in? What does ...
1
vote
1answer
480 views

Windows batch file or script to load exported Wi-Fi XML profiles onto a new laptop

This probably is as simple as reconfiguring the standard code used by MS for the same thing but .. I hope maybe someone has already done it. You can easily export a Wi-Fi profile to a USB including ...
1
vote
2answers
6k views

Automate mouse button click with script or macro

I'm searching for a script or macro program which pushes the 4th or 5th mouse button every 5 seconds. This script or macro program is for a friend who uses Windows 7 on an Asus notebook. I cannot try ...
0
votes
1answer
651 views

How to remove blank lines in .txt files

I want to change a text file's format, removing all blank lines. How can I do that? (2) 5. The function of the condenser is to: a) vapourise the liquid refrigerant b) change ...
0
votes
2answers
159 views

Folders named as the current month by command line

I have this code : xcopy "C:\30*.zip" "C:\Folder\" what i want is to copy the zip files to a new folder, this folder named as the current month ex : March , April
0
votes
2answers
442 views

How to create script auto run without choose on Ubuntu?

I create a script and when I execute it, a dialog show for me choose one option: Run in Terminal, Display, Cancel and Run. I want run it automatically without choose option. Anybody know how ?
0
votes
2answers
782 views

Automate keystrokes in Windows 7 64-bit

I need to automate the pressing of the key then pressing 5 digits then press in Windows 7 64-bit. I have an app that comes up on the screen and I need the "script" to press the keys. I don't even ...
0
votes
3answers
664 views

Some websites prompt to download PHP script after some time, but only in Firefox

This happens only in Firefox - NOT in IE or in Safari (all 3 tested only on a Windows system). Always, viewing a page shows most of the content, and then the browser prompts to download some sidebar ...
24
votes
2answers
28k views

SSH: execute sudo command

I have an interactive shell script, that at one place needs to ssh to another machine (Ubuntu based) and execute something as root (the user should enter his password, but the remote command should ...
19
votes
6answers
83k views

Running bat file at startup as administrator in Windows 7

I'm currently running a startup script in form of a bat file successfully in Windows 7 (I've inserted a new registry key entry with the bat file path as value in ...
8
votes
2answers
10k views

Can I make a script always execute as root?

How to make a script execute as root, no matter who executes it? I read about setuid but I'm not sure how to do this. I'm using Linux, Ubuntu 12.04 LTS.
35
votes
9answers
6k views

What scripting languages are useful in Windows? [closed]

What scripting languages are useful for Windows automation?
11
votes
1answer
6k views

Is there a way to call a script when Ubuntu wakes up from suspend or hibernate mode?

I have a little shell script that I run automatically when I log on to my Ubuntu machine; it will set the parameters of my touchpad the way I like it. However, when Ubuntu wakes up after being ...
4
votes
1answer
4k views

Setting file creation date in Mac OS X

I need a script to set the creation date to the modification date for a bunch of files created by my sound recorder - any way to do this? Running Mac OS X 10.4.11
3
votes
1answer
3k views

OSX 'open with' bash script

I've got a bash script, potentially many of them in fact, which I'd like to be able to open files in OSX's finder with. It's a really, really simple concept but for some reason bash scripts are ...
7
votes
6answers
2k views

Best practices to alias the rm command and make it safer

Some time ago I erroneously deleted my home folder because I ran a rm -rf * on the wrong terminal, whose working directory was the home folder! I wish I had an alias for the rm command, but it was ...
7
votes
1answer
8k views

Run a batch command for every file in a directory

I have a Java program working with this syntax: command.jar namefile I have to run this program for 1600 files in a directory. How can I run this command for every file automatically? Is there a ...
6
votes
4answers
3k views

Script to move specific user folders in Windows 7

When I install Windows Vista/7, I move some of my user folders onto a new partition (i.e. Documents, Musics, Pictures, etc.). This does not include moving the whole User directory, just some of the ...
4
votes
1answer
233 views

Simplest setup on Windows to send HTTP request, get and apply regex to response, and write match(es) to output file

I'd like to write a script that records the size of the close votes review queue on SO (currently ~95.5k), polling just a few times an hour, so I could plot a general trend. I know what I'm going to ...