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)

1
vote
1answer
2k views

Powershell script to run a .reg file on remote computers

I have tried creating a batch file using PsExec to update registry settings on remote computers without success so I am now trying to use Powershell. I have compiled the following script by using ...
5
votes
6answers
24k 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 ...
0
votes
2answers
36 views

Removing default printers via command line

For a company I have to remove the default printers(fax, onenote, ...). Manually you would do this in control panel, right clicking it, and do remove printer. Using i.e.: printui.exe /dd /m "Send to ...
1
vote
1answer
18 views

Windows 2008 Runlevel Scripts on Shutdown. Is it possible?

When Windows 2008 gets shutdown or rebooted [not via a script] by someone, is there a way to have a pre-processing script executed similar to UNIX runlevel scripts?
2
votes
2answers
989 views

How do I automatically empty the trash on logout?

Users on a linux (CentOS4) machine I administer consistently forget to empty the trash. Since the people work on big files, this can fill up the /home partition very quickly. Therefore, I would like ...
-1
votes
1answer
19 views

How to write a script to write root shell in file.log?

I use loger to write in file.log,but I can't execute the script.sh.I do it with bash script.sh and ./script.sh but I receive message bash: ./script.sh: Permission denied
0
votes
1answer
23 views

Implementing changes via script

Learning stage of understanding script. I have to make these below change on every new system. So I created these script, unfortunately it isn't working. I want to understand that if the user input ...
0
votes
4answers
53 views

Bash background process still blocking script flow in subshell

I am trying to do something that involves scripts calling other scripts in subshells to capture their output. One of the scripts needs to have a side effect of starting a background process. This all ...
4
votes
6answers
53k 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 ...
-1
votes
1answer
43 views

simulate(trigger) CTRL key press with click event

I am working on some kind of script. It needs to remain on the same tab when performing click event but clicked link should open in new tab. I can use Ctrl + Click but how to press CTRL ...
0
votes
1answer
60 views

Script not running on resume/wakeup in Ubuntu

I have a script named 999_thaw_flash.sh in my /etc/pm/sleep.d The script follows like this :- export DISPLAY=:0 #!/bin/bash case "{$1}" in resume|thaw) lynx --dump link1 >> file1 lynx --...
1
vote
0answers
24 views

Need help writing Linux script to automate moving files when flash drive is inserted

I am trying to use a Raspberry Pi running Raspbian to automatically move (not copy) the contents of Folder A (local) to Folder B (on SD card via USB to SD card reader) automatically when the card/...
1
vote
1answer
29 views

Linux bash script for oldest file in a folder + return value if folder is empty

I am using SUSE Linux Enterprise Server 11 (x86_64) I need to find a folders oldest file and print it out in unixtime. I did get the job done with this one liner: find $1 -maxdepth 1 -type f | xargs -...
0
votes
2answers
50 views

How to use crontab to launch scripts

I have created a script (which I already tested if it works) and I want to use crontab to launch it everytime my pc reboots. I created these script called test.sh just for fun and it's pretty easy: ...
1
vote
2answers
64 views

Custom script run with sudo - command not found

Problem: Running a script as sudo returns sudo: mount-remove-hiberfile: command not found Info: Scripts folder: '/scripts' (all my custom scripts are kept here) My User: 'cybex' cybex@cybex-...
0
votes
0answers
13 views

Batch converting .rar to .7z - path variable?

I found someone who had written a very nice batch script to convert .zip to .7z, and im attempting to make it convert .rar to 7z. I am able to get the script to work but I cannot figure out where the "...
3
votes
2answers
2k views

Set one homepage for all browsers simultaneously

For testing purposes, I would like to set the homepage of all browsers installed on my computer — Internet Explorer, Chrome, Firefox and Safari — to the same page. I'd like to do this all ...
-1
votes
1answer
47 views

Why does this “find” command scan all directories?

I only want to recursively scan Documents and not leave that "parent" folder. My script scans recursively my entire file system, and I am not sure what element of this script is causing that to occur....
0
votes
1answer
21 views

Where to save scripts on DD-WRT power-less-safe?

i have saved script into /tmp folder but when router lost power, file was deleted. Is there any safer variant to save? I need to run this script every minute by cron.
8
votes
4answers
36k views

Script - How to check if a network path is available and then map it

I would like an screen saver / logon script that checks if a network path is available and then map it to a unit. If it is not available it disconnects/don't connect. Network path is \192.168.1.1\...
1
vote
1answer
51 views

Bat script for a set of csv files in a folder

How to store a value in a variable and load that variable as a new column in a file using a batch script? The above link is used to read a date field and write it to all the records in a csv file. I ...
0
votes
0answers
313 views

How to automate software registration via batch or script

We use a program called vspace created by ncomputing. This allows for example 4 stations on a single host machine. So, each time this is installed we have to fill out the registration form which pops ...
1
vote
1answer
49 views

How to run a sequence of bash scripts one at a time in Linux?

I have several bash scripts, or rather one script that has to be run multiple times. This script accepts several command line arguments and does something with them. I need to run this script ...
0
votes
1answer
20 views

ffmpeg local expansion and running a command within

Big time n00b question.. I just can't quite figure out what I'm doing wrong. Here is my .bat file: @ECHO OFF SETLOCAL set /p Input= Drop file here, and click enter. set file=%Input% FOR %%i IN (%...
-1
votes
1answer
42 views

A video player that auto-plays videos in sequence while skipping certain parts

There is a TV show I like; I have its episodes stored as video files on my SSD. Each video file is about 24 minutes long, but only 20 minutes of that is the actual episode; the rest is intro, outro, ...
1
vote
3answers
3k views

OpenVPN --up script - “could not execute external program”

After a few days on Google, i'm not able to find the right answer to my question. After reading a lot of scripting possibilities, then OpenVPN is up. I have a client running Debian 7.8, with OpenVPN ...
0
votes
1answer
27 views

Debian Scripting to remove the logging during apt-get install

I'm trying to remove the log that debian puts out after you apt-get install something Ign http://ftp.uk.debian.org jessie InRelease Hit http://ftp.uk.debian.org jessie-updates InRelease Get:1 http://...
29
votes
8answers
7k 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
26 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
21 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
41 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
157 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 ...
0
votes
0answers
68 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
5k 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 ...
0
votes
1answer
52 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
16 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 /home/...
2
votes
1answer
3k 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
13 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
38 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 = objFSO.GetFile("C:\Windows\...
0
votes
0answers
13 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
71 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
53 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
2answers
156 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
32 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
778 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 example,...
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 characters,...
33
votes
3answers
45k 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 ...
-6
votes
1answer
33 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 IN="ifa_in_B2C=ifa_inB2C;ifa_in_ERP_Soap=ifa_inERP;sm=sm_main;tp=tp_main;trp=trp_main;...
0
votes
0answers
23 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 ...