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
24 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 ...
0
votes
1answer
25 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 sript: #! /bin/sh ip=10.147.243.63 worker=$(grep -e $ip $1 | awk '{ print $3; }') echo "[Hostname: ]" echo ...
1
vote
3answers
40 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
6 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
12 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
37 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
48 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
40 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
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% ...
0
votes
1answer
27 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
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
52 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
18 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
21 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?
0
votes
0answers
24 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
20 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
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 ...
0
votes
1answer
49 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
7 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
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
2answers
46 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
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 ...
1
vote
1answer
11 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
21 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 ...
-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 ...
0
votes
0answers
19 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
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
49 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
36 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
61 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
305 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
42 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
49 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
33 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
42 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
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
1answer
38 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
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
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
37 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
83 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
19 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
1
vote
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
57 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
24 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 ...
1
vote
1answer
34 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. ...
0
votes
1answer
59 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
59 views

Win7 unlock & logout after x minutes

I have been asked to investigate some functionality for a number of shared PCs running Win7 on a local network. Basically people are logging on to the PCs and locking them in the morning and walking ...
-1
votes
1answer
52 views

Batch- file to move all files from one location to another in windows?

what I'm after is a batch file that will move all files from one folder to another, with the view eto schedule this as a task to run twice daily. I know the whole move command etc but appears to be ...