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
2answers
32 views

Powershell: Dir /s - Remove Repeated Folders

Situation: In Powershell, I'm using: $folders = dir -s C:\Users\Name\Downloads\*.ttf | Select Directory foreach ($folder in $folders) { echo $folder } To display folders whose contents ...
0
votes
1answer
48 views

Rotate all video in a folder with ffmpeg?

I have a lot of videos which are recorder 90 • rotated so I want to rotate all videos 90 degrees clockwise direction. If this possible? I used for loop but there is some mistake because of spaces ...
1
vote
2answers
28 views

How to hide all files in a folder via using terminal or script

I have a folder which located as /home/makgun/Desktop/a\ b so that I tried this command mv /home/makgun/Desktop/a\ b/* /home/makgun/Desktop/a\ b/.* to rename all files as .FILENAME to be hidden but ...
0
votes
0answers
48 views

Python/Powershell Script for Telnet

I'm most familiar with powershell and python so a solution which utilized either of them would be ideal. I'm also open to other ideas on resolving this issue. So I have a situation where an old ...
2
votes
2answers
34 views

Running bash scripts from bash script in other folder

I've got several folders (one for each month), each with a bash script savetodatabase.sh. I want to run all of them after each other, so I made a script named saveall.sh which has the following code: ...
1
vote
1answer
35 views

Redirections shell

Can anyone explain the following? :~$ ls macreave.sh fgvdvg > testo 2> testo :~$ cat testo macreave.sh ccess fgvdvg: No such file or directory :~$ ls macreave.sh fgvdvg > testo ...
0
votes
1answer
33 views

Script Shell Find each occurrence of a String in a file

Here is the structure of my file: /**** Some Text here ****/ DN 10.147.243.93 51.46 KB 256 34.2% DN 10.147.243.89 83.05 KB 256 34.6% DN 10.147.243.88 66.43 ...
1
vote
1answer
56 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 ...
2
votes
3answers
88 views

difference between ${} and $() in shell script

$ echo $(date) Thu Jul 2 16:33:11 SGT 2015 $ echo ${date} $ name=foo $ echo $(name) ksh: name: not found $ echo ${name} foo Seems like ${variable} is the same as $variable. while $() is to ...
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 ...
0
votes
3answers
64 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 ...
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% ...
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 ...
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
88 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?
1
vote
2answers
145 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
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 ...
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
1answer
30 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? ...
-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
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 ...
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 ...
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 ...
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
1answer
37 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 ...
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 ...
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
168 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
379 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
0answers
139 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
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
136 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
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
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 ...
3
votes
2answers
115 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
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
276 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 ...
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
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: ...
0
votes
2answers
68 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 ...