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)

27
votes
8answers
6k views

Is it possible to restart a computer in response to an email notification?

I'm looking for a way to reboot machines after getting an email notification. The setup I want to use this on is a render farm. We have 5 boxes with 8 Nvidia GTX 980Ti in them. They're running ...
0
votes
1answer
35 views

Launching processes while I sleep

I am an absolute newbie to any advanced working with PC, so I need your help and I hope there is someone who can help me. What I need is "something", that would do work for me while I sleep. My ...
0
votes
1answer
4k views

Rename a Mapped Network Drive via CMD

I map a network drive via command line. Once this drive is mapped, it appears under My Computer with the full path. How can I rename the mapped drive using command prompt? I have used the "full ...
0
votes
1answer
18 views

Can we install a package through a shell script? [duplicate]

I'm trying to write a shell script so that when I reinstall my Ubuntu again. I could just run script and retain all the packages. And I'm planning to pass password in form of argument. My question ...
1
vote
1answer
17 views

How to conveniently save a plain image in GIMP?

Ever since the move to first class image editing file formats, it is always a pain when I am 100% sure I want to just crop one image and not care about it. I have already copied it and don't want the ...
0
votes
0answers
31 views

Looking to rename large amount of files using bat script

I'm still pretty new to the use of powershell, scripts, and the like, so I'm sorry that I don't have some form of script to start with. All I have is the specifics on my problem. I have a large ...
1
vote
1answer
141 views

Send keystrokes to two windows at once

What I want to do: Be able to enter keystrokes while one program is in focus, but also send the same keystrokes to a second program on the other screen. What I have tried: xvkbd - I've tried ...
225
votes
27answers
123k 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 ...
-2
votes
0answers
24 views

Moving Files from Local Drive to Network Drive

Windows Environment Scenario: Program is writing files to a local directory (e.g. c:). Issue: We want users to only use network shared drives. It is not possible to configure the program to write ...
0
votes
0answers
36 views

Automatically create subfolders by date and move files into subfolder at the end of the day

I use the software iSpy to record audio and I have set it up to save the recordings to a folder. The problem is that there is no organization at all, so I have thousands of audio recordings in one ...
3
votes
3answers
4k 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 ...
1
vote
1answer
11k views

Batch file script for Enable & disable the “use automatic Configuration Script”

My intention is to create a .bat file that toggles the check box of "use automatic Configuration Script" in Internet Settings. The following is my script @echo OFF setlocal ENABLEEXTENSIONS set ...
0
votes
1answer
20 views

ubuntu 12.04 nmcli doesn't list connections under one no-login user

I am running bacula as my backup system and I would like to run a script before some backup jobs to establish a VPN connection and access some servers that don't have public IPs. I have configured a ...
0
votes
0answers
11 views

Errors in script which runs on boot

I have made an installer script of my architecture which runs on boot, and I added it to chkconfig: #!/bin/bash # # chkconfig: 2345 99 30 # description: Product Installer Service # if [ -f ...
2
votes
1answer
361 views

script for installing the service pack for the corresponding windows version

I'm creating a script for installing the service pack for the corresponding windows version. So I want the script to determine the Windows version I'm on and the service pack installed and then ...
0
votes
0answers
12 views

How do I avoid getting prompted for a password when I run this script?

I’m using Amazon Linux. If I login as my “otheruser” user, and create a script, test.sh, with this text sleep 5 ; sudo reboot now I can login and run the script like so … [davea@mydevbox ~]$ sudo ...
0
votes
1answer
27 views

Modifying script to capture login/shutdown times in Windows

For some time now I've been using this script to view my login time for a particular computer: Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = ...
0
votes
0answers
12 views

daemon script on windows

I need to have a script that watches a certain ftp folder, and whenever it sees any files in it, perform some operations on it. I was thinking of using a simple script, like power shell and make sure ...
0
votes
1answer
49 views

How do I remove file extensions from all files on Mac?

I have a bunch of files with arbitrary extensions OVER (i.e., after) the old extensions; e.g.: a10.lua.c76c8a36-6f80-4b5e-b6a4-ed7c6817ca2e boneaxe.gif.e65e71e9-69e6-4d64-8648-1d6a9c8c7a1f All of ...
1
vote
1answer
21 views

Automating SSH login gives unresponsive remote-shell, dropping back to client-terminal (without errors)

I have a problem with the tool expect under Ubuntu 14.04 LTS. I want to automate ssh logins to some Sophos UTM Firewalls and evelate my rights directly after with "sudo su -" and the correct password. ...
1
vote
2answers
1k 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 ...
1
vote
1answer
4k views

Powershell Script to SFTP New files

I have a script here that SFTP's files from one location to another, the script works fine however I'd like to change the script so that it only copies files that are not already present. Bit of a ...
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.
1
vote
2answers
155 views

Best way to iterate through a bunch of files and search/replace text?

I'm having some trouble doing something that should be fairly simple. Here is how I imagine it would work: find . -name *.txt -exec sed 's/oldtext/newtext/g' {} > tmp \\; mv tmp {} \; ...
0
votes
0answers
23 views

How to determine (in a given time span in the PAST) which were the top CPU-using processes?

Short question: How do I determine which were the top processes hogging the CPU (Windows 7 Home Premium quad-core laptop) in a period of time which started 15 minutes ago and ended 01 second ago ? ...
3
votes
3answers
658 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 ...
1
vote
1answer
22 views

Access to line arguments in shell script

I wonder if there is possible to access full command line call in shell script. In my script I need to pass it further. I find that there are $@ and $* accessors, but it do not pass all the ...
32
votes
3answers
44k 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 ...
-5
votes
1answer
29 views

converting shell script to bash script

can anyone help me by converting this shell script to bash script pl. my shell scrpit is as follows #!/bin/bash ...
2
votes
2answers
5k views

How to Find User Name and IP address of users Logged on a Remote System

How can I find user name(of the local machine) of the last logged on user on a remote system. Is there any command or script we can use? I am able to capture IP address of the local machine of the ...
0
votes
0answers
15 views

How to create script to change audio device in SIP Phone on Windows 7

I hope I am posting in the right place, if there is somewhere more suitable, please point me in the right direction! Here is the picture describing what I want to accomplish with a hotkey or a ...
0
votes
1answer
28 views

Get 'No rule to make target 'modules'. ' on make file

While I am installing the driver of Realtek RTL8192EU chipset (0bda:818b) form this package and, follow the how-to-install.txt , I got error while running sudo ./install.sh [tjm@ArchPad ...
0
votes
1answer
22 views

How do I properly configure conditional actions with user input in VBS with MsgBox?

Today I started trying to create my own custom Dialog boxes for Windows. I'm able to use a shortcut/wscript.exe to run a VBS file with the following: (please ignore the dialog. I know that Drive C: ...
0
votes
3answers
3k views

Batch script to append record to csv files

I have a bunch of stock data in csv's that I am backtesting trading strategies on. The problem is that my strategy buys the open market price if a signal was found yesterday, unfortunately my data is ...
4
votes
1answer
35 views

Batch script to delete specific folders

I want to be able to run a script at a parent folder that contains other folders, the script will delete all the folders of a certain name. So for example to remove all the bin folders and only them: ...
0
votes
2answers
1k views

Running Javascript files (.js)

I've noticed that if you try and run (not edit) a Javascript file, instead of going to edit. It will come up with an error. This error normally sounds like it is missing a reference (your code, not ...
1
vote
1answer
522 views

script for auto adding routing table entries

There are a lot of remote agents that use Mountain Lion. We want only the directories on our intranet to be go through the VPN tunnel and all other traffic to go direct out. So to do this I had to add ...
12
votes
7answers
8k 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 ...
0
votes
1answer
20 views

why after subtraction is an extra space generated in a batch script?

I am trying to copy my dbf file into a backup folder every Monday. If the Monday is not greater then 7 then it will copy previous month file. When I subtract 1 from the month it adds an extra space. ...
1
vote
0answers
24 views

What is the background script that SUPERUSER is using to automatically update content without reloading the page? [migrated]

I am pretty much interested to know what is the background script that SUPERUSER (any StackExchange community for that matter) is using to automatically update the content of webpage without reloading ...
0
votes
1answer
32 views

Control excessive outbound traffic

Ubuntu server is sending outbound request excessively. I am not sure why this happening. Following is the output I am getting for tcpdump root@demotrt:~# tcpdump -n -n port 53 tcpdump: verbose ...
0
votes
1answer
34 views

How do you make a list/file for pacman to install from?

I am trying to move from one arch install a (partitioned one) to another (a less-partitioned one) on my computer and I want a similar set up. So I was wondering if there was a simple way to get pacman ...
0
votes
2answers
4k views

Local group policy logon startup script not executing

This is for Windows 7 I have a .bat and .vbs file in a folder. The .bat runs the .vbs script. In the Local Policy Group editor, under Windows Settings/Scripts I added a reference to the .bat file in ...
19
votes
12answers
12k views

How to clean up output of linux 'script' command

I'm using the linux 'script' command http://www.linuxcommand.org/man_pages/script1.html to track some interactive sessions. The output files from that contain unprintable characters, including my ...
2
votes
2answers
31 views

Nesting IF in Windows Bat file

I am having some difficulty in understanding how the Nested IF works in windows .bat script. What I wish to achieve is as follows. I shall be passing two parameters to a bat file IF first parameter = ...
6
votes
3answers
7k views

Recursive unrar of several folders

I have several RAR archives spread around multiple directories but all under a particular root folder on my Debian based NAS. Could someone help me write a simple script that would recursively go into ...
0
votes
0answers
20 views

Google Script to Copy Rows Containing Todays Date To Another Sheet

I have the following script that works just fine, except i now need it to copy all rows in "Dashboard" column A that has that has "today's" date (current date), beginning in row 13. Note, the ...
0
votes
2answers
3k views

Windows PE 3.0 detect what device it was booted from

I am creating a custom boot disk for work using Windows PE 3.0. I need to be able to tell what drive the system was booted from. it may be a CD, or a USB Flash drive. In the past, I have looked for ...
-3
votes
0answers
33 views

Making a batch script to find specific files and copy then to a folder

Please could someone help me finish a scriot that should under windows server 2008 R2 English: Ask user to input a text; this text should be put into a variable and used by next command (findstr) ...
0
votes
1answer
17 views

Script Shell Division Operation

Here is my script: #!/bin/bash nb_lines=30 expr 100 / $nb_lines ./test1.sh 3 1) How can i change this script to have '3.33333333' ? Variable 1 2) How can i change this script to have '4' (round ...