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)

0
votes
1answer
11 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 ...
3
votes
6answers
48k 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
15 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
16 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 ...
0
votes
0answers
15 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 ...
1
vote
1answer
23 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
21 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
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
0answers
26 views

command doesn't stop when finds a hit? [on hold]

I use ncrack and this is the code I use inside a bat file and this are all my 6 pass lists: Ncrack running 1 pass then 2'nd pass then 3'rd pass etc....but.. ncrack --user Admin -P pass1.txt ...
1
vote
2answers
34 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' ...
0
votes
0answers
10 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 ...
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 ...
-1
votes
0answers
17 views

Get the last Microsoft published update, within a script [duplicate]

I have a Powershell script that I use to monitor several machines. Among elements checked, I have the installed Windows OS and the last update installed using : $listeMAJ = Get-HotFix -ComputerName ...
2
votes
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.
3
votes
2answers
1k 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
43 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 ...
0
votes
1answer
12 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
33k 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 ...
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 ...
1
vote
1answer
25 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
292 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
33 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
16 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
24 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
2k 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
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 ...
0
votes
1answer
24 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 ...
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 ...
-1
votes
0answers
42 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
21 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
19 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
37 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
145 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 ...
229
votes
27answers
126k 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
29 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
41 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
32 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
12 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
1k 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
32 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
67 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
30 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
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
26 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 ? ...