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)

5
votes
2answers
6k views

Powershell: Get inital character string from file name and create directory from string, then move files

I have a folder with the following file names: 00150005D201110172338427995.vpf 00150005D201110180005318058.vpf 00150013D201110180014448082.vpf 00150013D201110180022268098.vpf ...
5
votes
2answers
602 views

Good log colorizing script?

I'm looking for a script which I can pipe a log into, specifically the tail -f of a log, and it will colorize it. Log would be in syslog format but if there's a program that handles multiple formats ...
5
votes
3answers
3k views

Automator workflow save as

(first time automator user) I created an Automator workflow (Folder Action) that watches a certain folder for certain file types and moves them to another folder.. I've tested it via Step and Run and ...
5
votes
2answers
183 views

Custom Gmail color theme

I hate Gmail's new color themes. I am looking for a way to change it back to the older color theme. Does anyone know any GreaseMonkey script or Firefox addon to do this?
5
votes
1answer
339 views

How to create keyboard shortcuts for URLs, with parameters added in?

As part of my job, I frequently have to visit several URLs that have the exact same address, except for one word. So for example, in one day, I'll visit the following sites over and over again: ...
5
votes
4answers
6k views

How to run a script at shutdown with Snow Leopard?

I want to run a script when I shutdown or restart my iMac, running Snow Leopard. I read somewhere that one could use the /etc/rc.shutdown.local for this, but it is not working for me. For example, I ...
5
votes
3answers
6k views

Windows 7 - How to run a script at shutdown but not at logoff

I was wondering if anyone knows how to configure a Windows 7 x64 Enterprise install that is on a domain to run a script if the user attempts to shutdown the computer - but I dont want the script to ...
5
votes
1answer
700 views

How do I maintain vertical splits with scrollbind in vim?

A while ago I saw a vim script which created vertical splits for the current buffer, so that the last line of the left window was the first line of the right window. It sets scrollbind so that what ...
5
votes
2answers
647 views

Create a flat file where control characters have been interpreted in Debian

I like to use the 'script' command to record console sessions. The problem is that the 'typescript' file which is created contains control chars (when using arrows or the delete key). Apart from ...
5
votes
3answers
162 views

A scripting language for legacy hardware [closed]

I want to pick up a scripting language for real legacy hardware. It must be compilable for 16-bit. What may suffice?
5
votes
2answers
2k views

How can I tell if OS X is connected to a VPN network from the command line?

How can I tell if OS X is connected to a VPN network from the command line? By running ifconfig without any arguments when I am connected, I see that there is a utun0 interface which appears to be ...
5
votes
3answers
5k views

How to run scripts within a telnet session?

I want to connect to a remote host using telnet there is no username/password verification just telnet remotehost then I need to input some commands for initialization and then I need to repeat ...
5
votes
1answer
132 views

A scripting language for videos

I'm searching for a way to to create a video sequence with something like a scripting language. The goal is to automate the process of generating a script which describes something like: place video ...
5
votes
4answers
2k views

Hook into linux mount/umount event

is there a way to provide post-mount and pre-umount scripts in Linux? I am trying to do some scripts on storage media when mounted and before umounting (eg, for synching). Any help appreciated.
4
votes
4answers
9k views

Delete blank lines from a text file

I am trying to delete all the blank lines in a text file. Is there a quick way to do this? What I have line one line two What I want line one line two I am using Notepad++, so a solution using ...
4
votes
2answers
268 views

Use of '#!' in *nix scripts

In many Apple/Unix scripts I see stuff preceeded by '#" which as far as I know means it is a remark. However often you see shell calls as below (the line with #!). ## Setting a default route ...
4
votes
7answers
13k views

How to convert .xlsx to .txt?

I want to know if there is a Linux tool or a script available to convert .xlsx file to .txt.
4
votes
4answers
12k views

Run AppleScript on startup (background)

I want to run a apple-script on Mac OS X on startup. The script shall run during the complete lifetime of the user session. What is the best solution to do this? My Script: on idle do shell ...
4
votes
5answers
6k views

crontab to wake osx from sleep

I have a crontab which will launch a certain program early in the morning (after I have gone to sleep) and close it again later in the morning (before I wake up). But my iMac will not execute the ...
4
votes
2answers
684 views

Need to truncate the %username% variable in windows 7 to seven characters

I use a script that generates a session name for out AS400 sessions based on the system %username%, the problem is that if the username is over 7 characters long the connection will fail. The session ...
4
votes
4answers
5k views

Setting ID3 title tag to be equal to MP3 file name

Has anyone got a bash script that will go through a media library and set the id3 title tag of each MP3 file to be equal to the file's name? I'm open to other automated methods too. It can be a GUI ...
4
votes
1answer
28k views

How to get filename only without path in windows command line?

for /r %f in (*) do echo %f Gives the output filename along with the entire path \path\to\dir\<filename> How do i get just the <filename> without the path included? I need to use that ...
4
votes
3answers
2k views

How can I logoff and go to stand-by via Win XP script?

I am looking for a way to write a script (of any sort) that would both log me off my local Windows account and also immediatedly put the computer to sleep / stand-by. I've found solutions that can do ...
4
votes
3answers
7k views

Windows xp command to search for files

What is the easiest way to search for files from a command line on Windows XP? I want to look for files created since a certain date, bigger than a certain size, or on a certain drive. Ideally I ...
4
votes
1answer
1k views

newline in bash variable

My script contains something like this: ifc=$(ifconfig) With this, the ifc variable contains the output of the command ifconfig but without newlines. So, when I print it with echo $ifc I get only ...
4
votes
5answers
1k views

Does anyone know of a scriptable way to switch Internet Proxy LAN Settings for browsers

I have two networks at work and when I have to use my Wireless settings I need IE to use one set of Proxy LAN Settings, and when I am plugged in I need a different set. I have been looking for a ...
4
votes
2answers
10k views

init.d script not running on startup

I am hosting some Counter-Strike game servers on my dedicated server using screen. I have this script that I run when I want to start/stop the servers: #! /bin/sh # /etc/init.d/css-server # case ...
4
votes
2answers
4k views

How do I configure Firefox through a script?

I'm looking to configure the following Firefox settings through a script (VBS or batch) default home page default search engine disable auto update Is this possible?
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
1answer
5k 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
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 ...
4
votes
1answer
2k views

noscript, how to allow script on one domain only?

Some forums allow direct embedding of YouTube videos, and it's slowing down my browsing a lot when a user posts several videos in a single post. I want to allow YouTube's script only on youtube.com, ...
4
votes
4answers
146 views

Download a pdf from a website every 24 hours?

I recently found G24, a pdf that The Guardian updates regularly with news summaries, which I can then print out. Is there a method to download said pdf every 24 hours? It has a static link, as they ...
4
votes
4answers
172 views

How to cut a file into pieces more efficiently?

Suppose I have a 10MB text file foo.txt, and it has 100,000 lines. Now, I want to process foo.txt window by window, with a window size 10. My current script is like this: for ...
4
votes
2answers
5k views

Recorder for AutoIt

Does anyone know where to find the latest AutoIt recorder? The one here does not work. It does not find RWSettings.alg and I do not know what that is. Any help will be appreciated.
4
votes
4answers
10k views

How can I launch multiple screen sessions from a single bash script?

I've written a script (that doesn't work) that looks something like this: #!/bin/sh screen -dmS "somename" somecommand for i in {0..5}; do screen -dmS "name$i" anothercommand $i done For some ...
4
votes
2answers
5k views

Bash script to perform an action on each subdirectory in a directory

Assuming I have a directory structure like Dir1/ SubDir1/ SubDir2/ SubDir3/ I'd like to be able to pass 'Dir1' to a bash script and then perform an action on all of it's subdirectories ...
4
votes
3answers
2k views

How to automatically launch a shell script when content of a given directory is changed

I'm developing a web project using some libraries that force me to launch a shell command to compile some files everytime i modify them. This task is obviously tiresome and i'm looking to find some ...
4
votes
5answers
2k views

zipping all files/dirs in a directory except some?

How can I make a zip of all the files and subdirectories in the directory "mydir", except all those files/dirs that begin with a ".*"? The command: zip -r mydir.zip mydir/ will include everything. ...
4
votes
3answers
1k views

I want to execute the commands in a loop at the same time, not one after another

I'd like to write a loop ('for') that will do some action 'X' number of times. But instead of performing the actions sequentially, one after another, I'd like them to execute simultaneously (in ...
4
votes
6answers
7k views

Launch synergy client on boot in Mac OS X

I have a mac as a secondary machine at work. Currently I use synergy on my main machine to share its keyboard and mouse with the mac. I created a launch agent for my user to launch synergy when I ...
4
votes
1answer
3k views

Can I automatically reboot if disconnected from the internet?

I have an old desktop that I'm running as a web server from my home while I'm at college. The internet at home is crappy and a lot of times when it goes down, the desktop can't reconnect without a ...
4
votes
2answers
2k views

Use sed command to replace , appearing between numbers

I have a CSV file where data are in the following format |001|,|abc,def|,123456,789,|aaa|,|bbb|,444,555,666 I want to replace only those "," that appears between numbers with some other character ...
4
votes
1answer
405 views

how to copy I/O not just redirect (Windows and Linux)

I have a simple call command call calabash -D sim.xpl >test.txt 2>&1 and this redirects into test.txt, how do I do both redirect into a file and allow it to show up in the prompt? (I ...
4
votes
1answer
812 views

gnu screen automation

i'd like to launch GNU screen, some shell command in it, then open new screen window(s) with different command(s) - all that automatically, from a script. is it possible? UPDATE the screen windows ...
4
votes
4answers
13k views

How do I make a script run upon startup of the Ubuntu machine?

I want to run /home/myuser/go.py How do I make that run in the background, everytime my linux machine boots up?
4
votes
3answers
764 views

Windows Startup and Shutdown scripts

In the group-policy editor, I see an option to add scripts to be executed on Startup and another option for scripts to be executed on Shutdown. Are these intended for personal use? And if so, are ...
4
votes
1answer
355 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 ...
4
votes
3answers
708 views

Handling prompts from an installer in Linux command line

I am writing a bash script that, amongst other things, installs some software. One of the installers I run requires answering some questions. For example: Is the default install folder ok (yes/no)? ...
4
votes
1answer
6k views

Running msiexec with PowerShell

I'm try to run msiexec in PowerShell but I keep getting an error message. If I run it from cmd then it's all fine. Can someone please let me know how I can run this command in PowerShell? This is ...