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

How can uptime be used to trigger a email if it see it does not contain days.

I took this from another thread I found here so that being said. I am new to scripting and it would be helpful if you could tell me how one would accomplish the following. I use pdsh so the first line ...
2
votes
1answer
35 views

run runas in a shell

I'm playing with a Windows 7 VM that I own. I started a reverse shell with ncat as listener. I can run commands except runas. Whenever I try to switch to another user I got prompted for the password ...
0
votes
1answer
40 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
2answers
79 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 ...
1
vote
2answers
1k 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
12 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
34 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
26 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
32 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 ...
0
votes
1answer
90 views

Most favorite scripting language used by IT pros [closed]

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
25 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
47 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?
2
votes
2answers
3k 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: ...
-1
votes
2answers
5k 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
12 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 ...
0
votes
1answer
120 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
18 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
2answers
86 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
32 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
38 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 ...
167
votes
19answers
88k 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
26 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 ...
77
votes
17answers
22k 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
34 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
49 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
62 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 ...
2
votes
2answers
405 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 ...
3
votes
2answers
116 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
85 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
171 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
381 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
56 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
42 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
50 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
137 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
142 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 ...
0
votes
0answers
31 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
16 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
77 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
0answers
281 views

Login script for Asus router to automate the login process to Tikona ISP

I am using Tikona ISP (India) for my internet connection. It uses captive portal for log in process. But after few minutes of inactivity it automatically logs out. I am using Asus router RT-N14UHP. It ...
0
votes
0answers
42 views

Script to Open Quicken and update Accounts

I am trying to write a script that will open the Quicken Program and then execute a Shift Command U.. when it finishes updated the accounts, it will close the application. This is what I have. tell ...
1
vote
0answers
21 views

AHK script when screen projected to connected screen

How to create a AHK script where depending on the screen situation (ie, if it is projected onto another screen or not) an application is open at a certain area or at another area
0
votes
2answers
69 views

WOL remote Windows pc's at startup

I have five Windows 8.1 pc's all connected together to the same local network. I'd like to automatically switch on my 4 slaves when I power on my Master pc. All the machines are properly set up to ...
-1
votes
1answer
31 views

Scripting sleep and wake up

I have an iMac that when it boots up the screen is all red and fuzzy, but if you put the Mac to sleep and wake it up again the screen is normal. Has anyone had this issue? If so what is it? I am ...
23
votes
4answers
17k views

zsh with Cygwin

How can I configure zsh to be the default shell under Cygwin?
0
votes
1answer
107 views

Remove substring from absolute path windows script

I am new to windows scripts and I have the absolute path like- /bin/debug/test/abc.xyz.dll and I want to remove the file name and get only path like output: /bin/debug/test/. How should I do that?
1
vote
1answer
497 views

Transform single column to multiple columns based on values

I have 1 column like below: AAA 999888 BBB 1111 BBB 2222 AAA 999777 BBB 3333 AAA 999666 BBB 4444 CCC Doit ... Consider above up to a few thousand rows. I want to convert it to below 3 column table ...
1
vote
1answer
44 views

Is there a way to automate folder optimization type in windows?

In windows 7 and 8, the downloads folder become optimized for pictures after a while, it causes the folder to lag when opened and even after changing that it returns to pictures every now and then. ...
3
votes
2answers
401 views

Restart-Computer and hold script

I'm running a Powershell script that requires a reboot in the middle of the script. After the reboot, the script is executing some commands (that can't be executed before the reboot!). I'm rebooting ...