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
5answers
17k views

Changing wallpaper depending on time of day via script or batch file?

I want to have 2 different wallpapers that change according to time of day (6 and 22 hours respectively) and only want to display the night one after 22 hours and the day one only after 6 hours and ...
5
votes
3answers
6k views

How to download this webpage with Wget?

I want to download the webpage http://forum.ubuntu-it.org/, but it requires a username and password. So I have used this: wget --save-cookies cookies.txt --post-data ...
5
votes
3answers
984 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 ...
5
votes
2answers
7k 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
7answers
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 ...
5
votes
2answers
618 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
186 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
375 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
1answer
6k views

How can I avoid the “grep: Argument list too long” error?

I'm using Mac 10.7.5 and on a bash shell. I'm trying to find instances of a string in a group of files but keep getting this error Daves-MacBook-Pro:folder davea$ find . -name "*" | xargs grep ...
5
votes
3answers
7k 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
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
1answer
751 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
3answers
667 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
3answers
6k 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
141 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
5answers
7k 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
774 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
5answers
11k views

Running scripts from another directory

Quite often, the script I want to execute is not located in my current working directory and I don't really want to leave it. Is it a good practice to run scripts (BASH, Perl etc.) from another ...
4
votes
4answers
7k views

Under Ubuntu, how can I place a shell alias command that will be global to everyone?

Under Ubuntu 9.10, where can I place an alias command that will be valid to all users, root or otherwise, and that will work with a shell under GNOME as well as an ssh session and plain console login ...
4
votes
4answers
6k 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
2answers
12k 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
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
8k 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
2k 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
1answer
1k views

What scripting/programming languages are default on Mac OSX?

I was wondering what programming or scripting languages come pre-installed on OSX? Particularly programs that can be run from the command line. I'm planning on parsing some CSS, and outputting an ...
4
votes
2answers
5k 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
4k views

Programmatically check if a Windows Server 2008 Feature is installed, and Install it

I'd like to be able to detect in a script whether a Windows Server 2008 installation has specific Windows features enabled, and install them if necessary. I do not simply want to use a "try to ...
4
votes
2answers
4k 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
3answers
152 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
190 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
6k 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
11k 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
792 views

Command line too long in batch file for Gimp

I have run into an issue using GIMP's batch processing. I have a lot of files spred over a directory tree which need to be processed by a script-fu. I tried to generate a batch file which calls my ...
4
votes
2answers
6k 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
3k 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
7answers
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
2answers
5k views

How can you automatically run a script after connecting to a VPN on OS X?

I have configured the VPN connection in OS X 10.7.3, but since the network I'm connecting to uses a corporate proxy, has custom Maven repository servers, and other network-specific settings (remote ...
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
433 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 ...