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
0answers
4 views

Autohotkey: adding each line of a txt file to an array. Skip lines which do not contain a character or a number

This should be fairly easy although I cant seem to find a way to make it work. I use an array to collect strings (Folder Paths) and I am looking for a way to avoid adding lines which do not contain a ...
0
votes
1answer
20 views

yes command replacement unix shell scripting

Is there any command like yes command for Sun OS 5.8? I want to give to write a script which I need to press n continuously, which I want to automate. I tried with yes command but it is not there in ...
3
votes
3answers
318 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
16 views

Run only specific /etc/network/if-up.d-script for specific interfaces

I would like to run a network script when bringing up a specific interface (e.g. eth0) by invoking ifup eth0 The script should ONLY run when bringing up eth0. My approach was to write the script ...
0
votes
0answers
24 views

Is there a script to reserve but not install/download Windows 10?

I need an easy way to reserve Windows 10 on numerous PCs but without actually upgrading yet.
1
vote
1answer
9k 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 ...
9
votes
3answers
26k views

PHP script can't run bash script. sh: Permission denied

I'm trying to exec a .sh script from PHP, however it is not executing. I checked the error logs, and I'm getting the 'sh: Permission denied' error. I checked under which user php is being run, and ...
0
votes
1answer
20 views

Windows batch script to replace a word in a filename

I've got a user that creates multiple exported sets of textures from a visual editing program he uses daily. When these export the filenames come out with a pattern of "texture*" (e.g. texture_43522, ...
1
vote
3answers
4k 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
3answers
43 views

Loop inside EOF - UNIX SCRIPTING

I am writing a script to automatic start up of an application whenever we found error in logs. so #/bin/bash if [ grep -c 'error' logs -eq 0 ] ;then exit else start <<EOF ## start is a ...
0
votes
0answers
5 views

Multiboot AD Binding Script Trouble (Error 10001)

So let's preface this with what I'm trying to do: I'm using DeployStudio to deploy multi-boot Macs, such as OSX10 and OSX09. My workflow goes like this upon Netbooting into the deployment server ...
-2
votes
1answer
27 views

using find and delete files/folder - with the exception of 1 folder - challenging

i want to use find and delete everything with the exception of one folder if found. e.g. [oracle@SJOAM test]$ ls -l total 4 -rw-r--r--. 1 oracle oinstall 0 Sep 2 02:05 a -rw-r--r--. 1 oracle ...
1
vote
1answer
27 views

automatic new mac setup (dotfiles, scripts, etc)

I'm looking for a way to automate the setup of a new macbook I'm about to purchase. I've done through quite a few during the years and it always takes forever to get everything up properly. I don't ...
169
votes
20answers
89k 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
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 ...
0
votes
1answer
38 views

Is there a way to write a Batch-file which will Return services into their Default mode?

I had already twice a problem with my computer were it just went out of controll and most of the functions were incontrolable, including services like Sound, Brightness, Internet and some other. Later ...
0
votes
0answers
21 views

Automatically open an application when Bluetooth is tuned on

I want an application to execute when my Bluetooth turns on. And also if possible to close the app if Bluetooth turns off.
0
votes
0answers
23 views

Failing script producing extra folder

I've run into an error that I'm not able to understand and fix despite extensive web searches over the past few days. I have a SetupComplete.cmd script under this location ...
0
votes
1answer
25 views

Bash script to create a folder structure

I'm trying to write a Bash script to automate a recurring task, namely the creation of a structure of folders, where some of them should be numbered (To be more specific, this is meant to archive some ...
0
votes
1answer
11 views

Remove all lines after /

I have 2 lists one with this format: http://www.example.com/archives/573 http://www.example.com/1812.html http://example.com/hello-world/ but i want it in this format www.example.com ...
4
votes
1answer
85 views

Quick way to find out how much silence is at the start of an MP3?

What's a quick and easy way to find out how much silence is at the start of an MP3? I know there's a lot that goes into that... I don't need anything too precise. Within 50 or so milliseconds is ...
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
4k views

How to auto commit to my git repository using cron?

I look into a lot of answers about this subject, but something is wrong here, let me explain. I create this script, to make my cron cleaner :) #!/bin/bash cd ...
0
votes
0answers
12 views

How to trigger autohotkey script with a download

I want to trigger my script every time my Gpodder program downloads an MP3.
0
votes
2answers
1k views

Windows script to toggle automatic configuration script checkbox without removing any existing string value

I'm trying to create a bat file to toggle the automatic configuration script checkbox in Internet Explorer (see red box in screenshot)...but without removing any existing value in the related textbox ...
-2
votes
1answer
38 views

bash: Loop over lines of a file

Here is my script: #! /bin/sh for line in $(cat list); do echo "[$line]: Getting my workers list.."; var=$line-"worker1"; echo "$var" >> "hostlistworkers.txt" ...
2
votes
3answers
3k views

Mac OS X script to change display resolution

Is it possible to change display resolution in Mac OS X? If so, how?
2
votes
1answer
657 views

Outlook 2010 - Reopen messages

The goal here is to compensate for the Executive use of Outlook 2010 at my employer. Most of the bosses have developed a work process of opening a plethora of outlook messages and then using said ...
1
vote
2answers
1k views

starting mongodb from a bash shell script

I am trying to start a mongodb using a cronjob+shell-script combo. In the shell, mongoDB starts when I enter $ mongod, however my executable shell script fails with mongod: command not found. I ...
0
votes
1answer
3k 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 ...
25
votes
8answers
102k views

Running bat file at startup as administrator in Windows 7

I'm currently running a startup script in form of a bat file successfully in Windows 7 (I've inserted a new registry key entry with the bat file path as value in ...
1
vote
1answer
18 views

How to remove pattern containing blank space and special characters in sed

How to remove following words from a text file: DEFAULT ('') DEFAULT ((0)) DEFAULT (((1)/(1))/(1900)) DEFAULT (getdate()) I am not able to delete above four pattens using sed.
1
vote
2answers
38 views

How to get latest version string from a collection of folder where folder name is version string

for folder structure like below RootFolder | |--1.2.3 |--1.2.4 |--2.1.3 ... ... ... Under RootFolder, there are a collection of folders, and they all named with ...
2
votes
3answers
2k views

Run a remote script/application in detached mode in Ansible

I am having trouble running a remote application startup script "detachedly" from an Ansible playbook. The script will run, but I can't get it to get/stay detached. I am probably doing something ...
7
votes
1answer
4k views

Generate html based on directory structure

does any one knows a linux based program/script that can generate html files based on directory structure?
0
votes
1answer
3k 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
0answers
19 views

How to get file path of selected file in Finder into clipboard? Issue with Jumpcut

I used to be able to get the file path from any selected file in Finder by hitting a keyboard shortcut. I'm running an automated script that takes Files and Folders in Finder and uses the built-in ...
0
votes
0answers
21 views

Undo command Linux “rm” [duplicate]

Please, I have used rm * in a script shell, it deleted all my files? (a typo) Is there a solution to recover these files ?
2
votes
1answer
19 views

Execute blocking script with admin rights in Windows before and after standby

I would like to run a script in Windows right before standby/sleep mode with admin rights and blocking, i.e., the system should not go to sleep until the script has successfully terminated. ...
1
vote
0answers
20 views

Outlook 2010 - setting a rule for an incoming mail (read or unread)

I need a little advice on Outlook 2010. There is this situation: - one webmail account which is used by a several people (using web browser or phone to access it) - one computer with MS Outlook 2010 ...
0
votes
0answers
29 views

Execute multiple commands in init.d script on boot

I found a guide for fixing permissions on an EXT4 filesystem on a MicroSD card. The AOSP/CyanogenMod ROMs I've tried will mount this, but the permissions are messed up. The guide used to work fine on ...
1
vote
1answer
18 views

Execute command to remote server via SSH after exporting variable

I have two machines, A and B. I need to execute a script which is located in B by SSHing there from A. In order for the script to run I also need to export a variable. If I just SSH and export the ...
2
votes
2answers
33 views

Script(?) to copy website text and automatically email it daily

Is there a way to automatically copy text from a website and email it to me daily? The scenario is this: my son’s teachers post his daily homework on a website. Each class has its own page. Rather ...
0
votes
0answers
14 views

CentOs How to run a command based on performance drop?

centos script automation I'm looking for a way to execute a command (in my case something that drops all connections that are mot Italians) when my server's performance drops and it starts lagging. I ...
0
votes
0answers
15 views

CentOs How to run a command on performance drop

I'm looking for a way to execute a command (in my case something that drops all connections that are mot Italians) when my server's performance drops and it starts lagging. I looked at inotifywait ...
1
vote
1answer
33 views

Extracting a list of values from JSON file to Excel or a text file

I want to extract usernames from a JSON data file. [{"username": "Cobra", "user_id": 146231486, "event_type": 2, "title": null, "class_id": 4211, "war_state" : null, "superpower_expire_date": ...
-2
votes
0answers
16 views

Copy Folder to Backup Location and Rename according to date variable

I'm looking for a script to copy a Folder from One location another, but then rename the copied folder to 'Backup 'CurrentDate''. At the moment I'm trying PowerShell, I'm just having trouble with the ...
0
votes
0answers
32 views

IE Tab 2 for Firefox Script locks up the page

In Microsoft CRM, whenever my client clicks on a link this error shows up after about 30 seconds of the new tab being locked up. We tried uninstalling and reinstalling the extension, made sure Firefox ...
1
vote
1answer
57 views

Concat string with variable after a 'grep'

Here is the structure of my file: g-4.n.g.fr 10.147.243.63 g-4.n.g.fr-w1 Here is my script: #! /bin/sh ip=10.147.243.63 worker=$(grep -e $ip $1 | awk '{ print $3; }') echo "[Hostname: ]" echo ...
-1
votes
1answer
5 views

I have Samba 3.x running on a server and i want to change passwords

So I have a Samba 3.x (don't know exactly) running on a server and what i want is to write a script or whatever, whichcan handle a file and change the user's password to a new one (which are in the ...