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
30 views

Script Shell Find a String in a file

Here is the structure of my file: /**** Some Text here ****/ UN 10.147.243.93 51.46 KB 256 34.2% UN 10.147.243.89 83.05 KB 256 34.6% DN 10.147.243.88 66.43 ...
1
vote
3answers
40 views

Running a Python script from the “Run” prompt

I thought this would be easy, but I've been struggling for a while. I have a Python script on my Windows machine called "myscript.py". I have it in a folder that's on my PATH, and I've added the ...
0
votes
3answers
36 views

How to append multiple .txt files to one file without header line

I have 100,000 .txt files with format below: bygrp,colnum,beta 100005,1,0.629519434191718 100005,2,-0.500000000026516 100005,3,0.560850895321124 100005,4,0.119624318119292 100005,5,0.257676682753309 ...
1
vote
2answers
752 views

Export installed certificate and private key from a command line remotely in Windows using something besides the certmgr.MSC tool

I need to be able to remotely export an installed computer certificate with the full certificate chain and private keys on a Windows server. The cert is used for IIS, and I want to use it for an ...
0
votes
0answers
9 views

Tracking changes of a file

Please, i'd like to know if there is a solution (command linux for example) to track changes in a file. UN: up ; DN: down Here is my file before changes: UN 10.147.243.93 51.46 KB 256 34.2% ...
1
vote
1answer
19 views

Script/program that listens for user input, reads logs for output and sends broadcast

During code deployments there is a risk of service/system failures. The Network Operations Center monitors alerts from servers. If the alert comes as a result of a code deployment then it might not be ...
1
vote
1answer
20 views

Windows: Run script on cd

On linux, I've got a number of scripts running upon changing to a directory. Tasks like updating repos, rotating logs, etc, are decided through a small bash script that overrides bash's "cd" and runs ...
0
votes
1answer
24 views

Result of | grep in a variable

Here is my script: var= $( $line | grep -Po '.*(?=.fr)' ) echo $var I have an error and it displays nothing: command not found Have you idea please ? Thank you so much for help. Best ...
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 ...
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
1answer
47 views

Most favorite scripting language used by IT pros [on hold]

What is the most favorite scripting languages used by IT pros and why? I see that Javascript is mostly used by developers while legacy VBScript and Powershell for Windows admins and bash/shell for ...
2
votes
1answer
17 views

PowerShell get TotalPhysicalMemory (RAM) without decimals

I'm writing a powershell script to inventory some info about computers (CPU, RAM, HDD, etc...). Everything is working quite well, but I'm stuck at getting the right output for the amount of RAM. Here ...
0
votes
0answers
20 views

Shell Script “cannot execute binary file”

I'm new to putty. However while running a shell script I got this error: "cannot execute binary file" I believed the syntax is : sh Name_of_shellScript.sh parameters How can I resolve this?
1
vote
2answers
2k views

I keep getting unresponsive script error in firefox for jQuery script

Yesterday I started getting unresponsive script errors like 6 times a day. And I know it has something to do with jQuery because I always get this in the error report: Script: ...
0
votes
0answers
19 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 ...
-1
votes
2answers
4k views

Quickly running Outlook rules on demand?

I have a rule set up in MS Outlook 2007 that I do not want to run automatically, but I do want to run sporadically by hand. I would like to expedite that "by hand" process as much as possible. Is ...
0
votes
0answers
11 views

Replace numbered paragraphs from one document to another?

I have two documents that are identical, but one is in English, the other in Spanish. I took the first and took care of reformatting it by hand, mostly. Now, rather than going through the lengthy ...
1
vote
1answer
8k 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
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
1answer
46 views

How can i kill a process remotely?

I use this command to kill remotely a process but it didn't work. ssh -t root@g-9 -x "sshpass -p 'ubuntu' ssh -t root@10.147.243.178 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -x ...
0
votes
0answers
11 views

How to change taskbar location via script when monitor is detected

I have a second monitor that I sometimes use, and would like to have windows move the taskbar to it whenever it detects the monitor - is there a way to script it to do such a thing? I believe I can ...
0
votes
0answers
6 views

Vimperator — Custom ExtendedHit to launch script/program on matching regex

I want to define a custom extendedhint in vimperator that: Matches a regex pattern Feeds that match to a script as such: ~/bin/script regex-match-as-arg Where should I start solving this problem? ...
0
votes
2answers
44 views

Windows 7 logoff script?

I've been trying this for a while, to no avail. I read many docs, including: Windows 7 - How to run a script at shutdown but not at logoff https://technet.microsoft.com/en-us/library/cc770300.aspx ...
-1
votes
2answers
31 views

Only show part of logfile in bash script

OpenVPN log looks like this: OpenVPN CLIENT LIST Updated,Sat Jun 20 04:20:07 2015 Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since [ A .... ] ROUTING TABLE Virtual Address,Common ...
0
votes
1answer
32 views

How to do this in all subdirectories in parent folder using batch script?

i am total noob for scripting so i need small help with this batch script... Here is script : @ECHO OFF SetLocal EnableDelayedExpansion SET par2_path="C:\PAR2\phpar2.exe" SET par2_redundancy=10 ...
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 ...
151
votes
19answers
79k 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 ...
4
votes
4answers
12k views

How can I launch multiple screen sessions from a single bash script?

I've written a script (that doesn't work) that looks something like this: #!/bin/sh screen -dmS "somename" somecommand for i in {0..5}; do screen -dmS "name$i" anothercommand $i done For some ...
1
vote
1answer
8 views

Monitor SSH login's via slack but hangs on SCP

I'm playing around with some slack integration so that every SSH attempt gets sent to a slack channel The script below works perfectly for SSH attempts but the issue is that when I preform a SCP to ...
70
votes
17answers
21k views

Add directory to $PATH if it's not already there

Has anybody written a bash function to add a directory to $PATH only if it's not already there? I typically add to PATH using something like: export PATH=/usr/local/mysql/bin:$PATH If I construct ...
0
votes
1answer
20 views

Unix gzip more than one file at once

I have come to the end of my research with unix:> I'm new with unix and its enviroment, so i need your help guys. Long story short, i have a housekeeping script, which runs daily/weekly (it doesnt ...
0
votes
2answers
37 views

Automate script | Rename a defined list of filename by a defined list of word powershell

All my code: #read list filenames + filter# $listname = Get-ChildItem 'Y:\Users\H\Documents\D\Game Of Throne' -Filter *.bmp #Read list file txt# $line = Get-Content ...
0
votes
1answer
47 views

Bash Script to generate <name> and pass this as command line argument to programm

I have an python script which gets 1 command line argument python arg Now I want a bash-script which: calls python arg & with the argument arg=000 make this x-times so therefore: python ...
-4
votes
0answers
63 views

How to remember parent process in nested batch scripts?

Can I remember the parent process that caused the child, in the sense of a return to the original script Batch as the directories are stored and restored PUSHDIR command POPDIR command? It may not be ...
2
votes
2answers
207 views

How to run a bash script and display any output in Conky?

The Bash script I’d like to run in Conky is a loop so only needs to be run once. It’s a monitoring script in case my VoIP router goes down. ${execi 3600 /home/justin/pingvoip} Conky doesn’t want ...
0
votes
0answers
18 views

How to make videos play more than 2x faster

Youtube has an option for playing videos 2x faster than usual, which I find extremely helpful for learning about various topics. But sometimes even then the video is moving too slow for my liking and ...
3
votes
2answers
114 views

Helping remote user with Linux by downloading scripts

So I'm an Linux fan and word is spreading. People bring their laptops to me to have a new installation. Now I want to help people easier without requiring them to bring me their laptop. I'm looking ...
0
votes
1answer
35 views

Delete last line always starting with 'TRAILER' from a text file in windows batch script

I want to remove the last line from a text file using a windows batch script. the last line will always be like 'TRAILER|'. How can i achieve that. My .txt file looks like : 1220|6963|TRUCK|5760| ...
0
votes
1answer
55 views

Change the “modified date” of a folders (in possibly powershell)

From time to time, when I force-shutdown a Windows Server 2003 machine (I have no choice), the folders contained in a certain directory all change their 'modified date' to the current date. Luckily, ...
3
votes
3answers
299 views

Script to get images in folder with dimensions printed to a .txt file

As title goes, is there a script for Win 7 to get printed on a .txt file all the images (JPG, PNG, GIF ecc) inside a folder along with "filename" and "pixels dimension"? I've tried with dir on ...
2
votes
2answers
41 views

How to compress multiple files with similar names?

So I've got some 20 000 files that I want to compress and group by following logic: compress every file that have identical characters up to ( also include files that have no ( So the files are ...
0
votes
1answer
36 views

Win 7 - Batch issue, it doesn't like spaces in folder names

You'll have to forgive me (or not) my knowledge of batch programming is fairly rudimentary. I have created a couple of batch files to help launch a game, change a system variable (to move saved games ...
-2
votes
1answer
30 views

Windows Scripting: If statement, comparison of two variables is not working

I have this part of the code which is running weird: if !NoOfLines!==!trailer! ( echo Count of records in DFUView interface verified ok. >> %LOG_DIR%\%SCRIPT_NAME%.log ) else ( echo ...
-1
votes
2answers
41 views

How to extract a string from last line in a text file -windows batch script

I have a .txt file in this format 123|abc|23456 234|rsty|68589 890|gfyu|5679 TRAILER|3| How do i extract "3" from the last line enclosed between "TRAILER|" and "3" ? Need help.
0
votes
0answers
44 views

Unzip .gz file in windows batch script using 7zip

I have 7 zip installed on windows machine. I have to extract .gz files into .txt files. I am not able to find a suitable command to do that. I tried below : 7za e ...
2
votes
3answers
2k views

How to test stability of wireless router

I had a wireless router that would intermittently drop connections, so I had switched to using a different router. I have since updated the firmware on the problematic router. Is there an easy way to ...
0
votes
0answers
23 views

connect to wifi via URL using code

I want to connect my tablet to a wifi that requires user name and password (and maybe a license agreement click) and submit button click that is available over a URL (like one at my school where I ...
0
votes
0answers
10 views

Masking external ip address using cmd or script on windows

I am using Windows and I want to mask my external ip address(not the "local "). using command prompt or some script, as we do in orbot on Android by swiping up in the app. i know about Tor browser ...
1
vote
1answer
33 views

Remove “has stopped working” message windows 8

I want to be able to remove the "has stopped working" message that comes up when a program crashes because I am trying to write a script that automatically opens the program back up if it does crash. ...
0
votes
1answer
3k views

List Mapped Drives of All Users

I often have to replicate the mapping of drives of one machine to another. While I know how to easily output the data for the CURRENT user I have not found a way of doing this for others who are not ...