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)

6
votes
3answers
2k views

Ruby shell instead of Bash shell in Ubuntu?

It seems to me that Ruby is far more powerful, and you can also do more powerful scripting with it. Are there any open source implementations out there that could replace Bash with Ruby on Ubuntu, so ...
6
votes
1answer
2k 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 ...
6
votes
3answers
7k 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 'user=goyamy&passwrd=...
6
votes
1answer
14k 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 ...
6
votes
3answers
960 views

Linux: How do I execute a script in a way that it knows its directory?

I need to write a script, which would be called from any location, but needs to run from the directory it resides in. The script should query its directory at runtime. How can this be achieved? ...
6
votes
4answers
5k views

How to prevent password popup everytime for changing network configuration in OS X Mountain Lion?

I have a few network scripts that I used under OS X Lion that automatically created a ssh connection and then changed network configuration on my local machine to run traffic through the ssh tunnel. ...
6
votes
3answers
5k 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 ...
6
votes
1answer
10k 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 '...
6
votes
1answer
14k 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 ...
6
votes
4answers
9k views

How do I autorun applications after mounting a TrueCrypt container?

I would like my TrueCrypt virtual drive to act as a newly inserted USB drive or CD/DVD by executing commands in the partition's autorun.inf file. I've read several suggestions online including ...
6
votes
1answer
20k views

Migrating an iTunes Playlist from one computer to another

Awhile ago, I moved all of my iTunes music from one computer to another, but I did so without copying the actual iTunes library folder from one to another. Since then, the libraries have diverged. ...
6
votes
4answers
3k 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.
5
votes
6answers
23k 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 ...
5
votes
4answers
9k 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 ?...
5
votes
3answers
2k views

Run Linux script at time 'n' on first day, 'n+15 mins' next day, and so on

I'm trying to take timelapse images using my webcam. What I want to do is run a script at midnight on 1st Jan, then 00:15 on 2nd Jan, 00:30, 3rd Jan and so on. This can keep running forever, I'll ...
5
votes
3answers
3k views

Automatically execute bash script under the privileges of another user

Is there a way to execute a bash script under the privileges of another user (automatically)? I think "sudo" is the right way, but I don't know how to automate the process. E.g. I want to run ...
5
votes
3answers
7k 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?
5
votes
4answers
3k views

Modify Conky to handle variable length values

I currently experimenting with DWM and Conky to create a minimal looking desktop to use for coding and things like that. I've got something nice going on, but there's something I'm having an issue ...
5
votes
5answers
2k views

What benefits could the average geek get out of Powershell?

I would like to know what benefits the average geek could get out of Powershell. So take people who spend all their time in front of their computer, but who aren't necessarily programmers. Gamers, ...
5
votes
7answers
3k 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
7answers
11k 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 ...
5
votes
2answers
12k 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
3answers
9k 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 (...
5
votes
1answer
3k views

How can I clear the scrollback buffer in konsole from bash?

I'm a heavy bash user and konsole is my preferred environment. I know I can use the keyboard command ctrl+shift+x to clear the scrollback buffer, but there's certain points in my scripts where I would ...
5
votes
2answers
12k views

Starting a script on xfce login and logout?

I use xfce4 as my desktop environment, running on a Gentoo box. I want to start the pulseaudio server when I login. In general, how do I get a script to run as soon as I login to xfce, and how do I ...
5
votes
3answers
2k 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 ...
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
647 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
1answer
5k views

Is there a script to add port forwarding rule in home router?

TL;DR: I am looking for a script or a cron job, which will periodically run on a linux host (fedora on raspberry pi) which will check if a port forwarding rule still exists in the router and add it if ...
5
votes
1answer
2k views

Batch video presenting (playing, pausing, going to specific time, …) in Linux

Is it possible to write an action file (e.g. a script) that plays some video files? I need it to be programmable to automatically perform these actions: start from a specific time play up to a ...
5
votes
2answers
605 views

Recursively fixing image file extensions in Linux

I have a bunch of image files from misnamed scans/faxes I need to fix for our Linux users. It turns out we have a bunch of scans that are PNG files that are labled as *.jpg visa versa. Under Windows ...
5
votes
2answers
3k views

Creating Windows shortcuts from Chrome bookmarks

I have a very large number of bookmarks in Google Chrome. I want to transfer all of them to a windows folder, so that each bookmark will be a shortcut to a website (I want a list of shortcuts, just ...
5
votes
2answers
197 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
538 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: https:...
5
votes
3answers
696 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
9k 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
3answers
6k views

Simplest way to check for dynamic IP change

What would be the easiest way to find, with a script, if my IP address has changed? Background info: I have a standard home cable modem connexion, and my ISP assigns me a dynamic IP. It changes ...
5
votes
4answers
7k 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
908 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
172 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
9k 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
192 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
3answers
40k views

Temporarily Disable Symantec Endpoint Protection?

I would like to temporarily disable Symantec Endpoint Protection. I know that this is done by right clicking the tray icon in the Windows, and then clicking enable/disable. What I would like to do ...
4
votes
6answers
50k views

How to manually stop a Python script that runs continuously on linux

I have a Python script that is running and continuously dumping errors into a log file. I want to edit the script and run it again, but don't know how to stop the script. I'm currently logged on ...
4
votes
4answers
10k 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
272 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 #!/bin/...
4
votes
5answers
10k 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
1k 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
3answers
5k views

Diff in bash script?

I've been toying around with makefiles and bash scripts and I'm interested in this: Is it possible to get a boolean value from a diff(or something similar) so that I can use it in a bash script to ...
4
votes
3answers
7k 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 ...