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

running for loop - but wait for string of words in log file to continue

so far I have this: for each in {01..10} ; do ./sb0$each/tomcat_sb0$each start;done that will start my apps at once, but I want it to wait until it reads one line in a file, what's the easiest way ...
1
vote
1answer
10 views

Specify the shell variant in Emacs local variables for the file

How can I specify the shell variant for a file in that file's Emacs local variables, when the file is not a standalone program? Emacs allows me to specify that a shell include file should be opened ...
0
votes
1answer
31 views

Cannot unzip with zip command line

I am having difficult unpacking a zip to a specific directory. I am trying to get all contents of subdirectory of the zipped file and not the parent directory. This is parent directory within zip ...
1
vote
1answer
31 views

Script: forward all emails from inbox, after users sends 'request' (Outlook 2003)

I am looking for a Outlook (2003) script. What I need: I want to forward all my emails from mailbox-A (from a PC) to mailbox-B (on my phone). The catch is: This rule should only run, when I send a ...
0
votes
2answers
34 views

Making PS1 prompt refreshable

I want my prompt to be changed based on an output of a certain command. and based on the command result to add a color. example: run the command: cphaprob stat | grep local | awk '{ print $NF }'` ...
4
votes
3answers
513 views

Delete all Files from Folder and Sub Folders

I'm wanting to remove all files from a folder structure so I'm left with an empty folder structure. Can this be achieved in either Batch or VBS scripting? I have tried a very basic batch command but ...
0
votes
1answer
33 views

MAC Rename files and move them automatically scripting

I want a shell script that runs on a Mac, that when ran, looks for a few things and transfers video files to a specific location on another drive. So when I put in an SD card, I want the script to ...
0
votes
0answers
21 views

Getopts - command with multiple options

I have a command script i'm making and wondering how do i go about combining multiple options the general usage of the command is as follows: Usage: myCommand [-fpr] [-n count] [-s size] [-u user] ...
0
votes
1answer
31 views

Running a script from ssh, logging out and continuing the script

The overall question here is - how do I automate sshing into a machine, running a script, and exiting without killing the script? I know that this has been answered several times, but I'm not having ...
-1
votes
0answers
11 views

How can I script a trading account to place stock orders when conditions are met? [closed]

I have account on optionsxpress.com and I'd like to write a script that can read data from the site then, if certain conditions are met, place a trade automatically. What's a good way to implement ...
1
vote
1answer
21 views

How do I identify shell script execution vs dot execution

I'm writing a bash script that needs to run on the current process for it to be useful. That is, I want to make sure that the script was invoked with source script.sh or . ./script.sh and not ...
1
vote
1answer
24 views

Creating a script to open and save a file

I currently have about five thousand 2D drawings, under many directories on one server, and all of them have a .prt extension. These files were created in the 90's using a software called CADKey. ...
0
votes
1answer
37 views

How do I write a batch script that iterates through all png files in all subfolders and does an action?

I'm looking to build a small batch script that executes the command line of pngout.exe So far I've got only this down for %i in (*.png) do "g:\myfiles\_pngout.exe" "%i" /s0 /c6 However, for that ...
0
votes
1answer
43 views

Install a Teamviewer Host Silently with Custom Password

So our company has the custom Teamviewer hosts that we can run silently with the /S switch. The issue is that we can't connect due to it not setting a password that we know. Does anyone have any ...
0
votes
0answers
36 views

Remove from the transfer list when seeding completes

Remove from the transfer list when seeding completes + Remove Data File... When the torrent finishes downloading, hazel starts to process. The only problem Is I would like to seed. So I use the ...
1
vote
0answers
18 views

Gimp script does not have permission to write a jpeg file

I'm trying to run a GIMP script to perform Error Level Analysis. I've downloaded the script (a `.scm file) from here. It does show up in the menu (Image -> Error Level Analysis), shows a dialog, ...
0
votes
1answer
32 views

SSH could not create directory /home/USERNAME/.ssh

My script is executing the below command: command = os.system('rdiff-backup --exclude "**.dropbox**" --exclude "**.ini**" --remote-schema "ssh -o ...
0
votes
3answers
42 views

Copy completed files larger than 1024M to another directory

I am using transmission-daemon. These are on torrent completion environment variables supported by transmission-daemon as shown here. In the directory of the completed download, find and copy any ...
0
votes
1answer
11 views

Get a typing effect in a Google Doc via script?

Not totally sure if this is the right SE site for the question, but here goes. I want to have a publicly viewable Google Doc which is modified programmatically (a script somewhere) and others viewing ...
1
vote
0answers
18 views

Creating multiple screens in a for loop to run parellel programs and sending commands to each

Before flagging this questions as redundant, i have read and tried every answer to similar questions with no success I have this loop where it traverses a directory structure, and runs a program ...
0
votes
0answers
17 views

Scan picture by folder by month

I bought a new printer HP pro 8600. With my old printer I could scan pictures,for every month there would be a folder by the name of the month and the pictures would be inside of this folder. The new ...
0
votes
1answer
28 views

Interact with remote “shell” from background script via SSH

I need to emulate the following with a script which is invoked by a web service run from a Linux server: Access remote AIX server via SSH Log into a Cache instance (if that's unfamiliar, pretend ...
0
votes
0answers
26 views

Batch Files - Script

I have a little .cmd script that executes few commands like mapping network drive, output some info to log file and copy the file on network including renaming the title based on date/time. This ...
2
votes
1answer
66 views

Robocopy “modified”

Using robocopy on Windows 8 to automate backing up several different groups of files. It labels all of them as "MODIFIED" all the time though even if I just ran it and haven't touched the files. How ...
0
votes
0answers
55 views

PsExec and invalid handles

I am trying to use a windows batch script that uses PsExec to execute commands on a remote machine. Periodically it has "invalid handle" and the script then fails. The script has not altered or ...
0
votes
2answers
30 views

Linux move files from specific directory one directory up and delete empty folder

I need to move files out from directory inside directory inside directory and remove folder that i move them from. I would need recursive script. Directory structure: ...
0
votes
1answer
44 views

How to extract the filename without the extension from a full path?

I'm trying to right my first bash script, and at one point a filename is passed to the script as $1. I need to extract the file name without the extension. Currently, I'm assuming that all extensions ...
0
votes
1answer
35 views

Is there a way to find out if a Windows 7 workstation has updates turned off in the control panel?

I have a domain with a group policy to run updates every night at 3AM. If the computer is turned off, the next time a user logs into the computer, the updates are downloaded. When the users shuts ...
0
votes
1answer
34 views

ControlC doesn't stop .cmd script in Windows7 CMD window

I work with several Windows7-64 systems. In all but one, typing ^C into a CMD window running a .cmd file, invariably (and expectedly) stops the program. More importantly, if the .cmd script launched ...
3
votes
1answer
50 views

#!/bin/bash -e :: what is `-e`? other arguments?

I am a shell script coder that always opt to use shell as top level as part of my belt in creating website apps on the fly and have relied on my bash scripts if I want a project to be implemented ...
1
vote
1answer
51 views

Calling PowerShell functions in another scripts

I have a script with a number of functions (not just functions but also other code). I would like to create another script that uses one of the functions in the main script. Here is a sample of what ...
0
votes
2answers
79 views

Creating a simple custom apt-get/config script

As I play more and more with Ubuntu, I'm starting to see how I can automate the majority of the repetitive commands that I perform whenever I reinstall the operating system. Thus far, it's just one ...
0
votes
1answer
46 views

VLC bash transcoding script destination directory

Well, I have such transcoding script: #!/bin/bash acodec="vorb" arate="256" ext="ogg" vlc="/usr/bin/vlc" fmt="mp3" for a in *$fmt; do $vlc -I dummy -vvv "$a" --sout ...
1
vote
1answer
26 views

Launch Script for Windows7

Hey guys hopefully I can thoroughly explain what I'm trying to do here! LOL I have a dual display Windows 7 PC and what I am trying to do is launch 2 different programs on boot, and I want one to ...
10
votes
2answers
691 views

What's the difference between the following cmd scripts?

I've tried launching several programs through a batch file and encountered problems but that is in the past. I'm relatively new to scripts and command lines and this would be my question: What's the ...
-1
votes
1answer
47 views

Execute command prompt file (.cmd) from within a PowerShell script?

What command do I need to put in a .ps1 file to execute setup.cmd and make it a forced install? I've tried to execute this command in powershell and its working: PS C:\> c:\setup.cmd ...
0
votes
1answer
42 views

input from shell in bash script

i have a bash script i would like modify to support input from shell atm i have to type the link after i have run the script wiak@test:~$ scripts/lget.sh gimme cookie! ...
0
votes
0answers
18 views

How to backup incremental with rsync with diffrent location for incremental changes?

I want to do incremental backup with rsync in centos. but I want to have a full backup in a specific folder and for incremental changes I use to another folder with time stamp. Is it possible and how? ...
12
votes
8answers
903 views

Bash Script to repeat every word in a line?

I have a string like: dog cat bird whale And I want to get dog dog cat cat bird bird whale whale All the words are in the same line. Any idea?
1
vote
1answer
24 views

bin/bash script: toggle bluetooth state?

I'm trying to do an alfred workflow that toggles my bluetooth connection. STATUS=$(/usr/local/bin/blueutil status) if [ $STATUS == "on" ] then /usr/local/bin/blueutil off echo "off" else ...
1
vote
1answer
50 views

Creating a zip file with a timestamp

I have been trying to create a script which compresses a directory with a timestamp and move it to another location on the same server, but I cant seem to get TESTDATE to display on the zip file, ...
2
votes
3answers
91 views

How can I find folders containg x files of a particular type and output those paths on OSX

I have this script for OSX for finding folders that only contain one file, and if that file is an audio file outputting the path of the audio file find "$1" -type d -exec sh -c '[[ $(find "$0" ...
0
votes
0answers
39 views

automatically prepend variable in for loop without having to put variable on each line

Is there a way to automatically have the $i variable prepended to the beginning of the command without having to specify it each time? Here is my current script. #!/bin/bash for i in "command ...
2
votes
1answer
44 views

Using Greasemonkey Scripts without Greasemonkey

I'm running Firefox in Linux x86_64. I'm wondering if it is possible to use the Greasemonkey scripts without using Greasemonkey. As the source of the scripts are available, it is possible to use them ...
-1
votes
1answer
45 views

write a batch file move a file random to folder?

i need write a batch file: folder A and folder B (empty) exam: files of folder A: *.txt c:\A\a.txt c:\A\b.txt c:\A\c.txt c:\A\d.txt run batch a time, it copy to B 1 file random. Thanks!
0
votes
0answers
46 views

AutoHotkey Script request: Autocharging and Autofire

This is a script request which would work for Mega Man and some other games. An AHK script which enables autocharging and autofire. I'm a newbie with programming so I believe I could use some help. ...
1
vote
2answers
158 views

How to create multiple folders and name them by reading lines from text file?

I have a plain text file named Export.txt. It contains a list of geographical places, preceeded by a 3 digit number with leading zeros. Example --START OF FILE-- 001 Aberdeen 002 Bellevue 003 Camas ...
0
votes
3answers
39 views

How to automatically copy randomly generated text from a website

I am not sure how best to ask this, as this my be a multi-pronged question, requiring different avenues of attack and my preconception of the solution is a basic input-function-output scenario. I am a ...
0
votes
0answers
4 views

open perfmon with custom category with predefined field

I'd like to add some .bat file to my installation, that once pressed will open Performance Counters with my subsystem counters In Report View Is that possible from command line?
1
vote
1answer
43 views

Powershell script with multiple msiexec calls [closed]

I am having problem with multiple msiexec calls in my PS Script msiexec /package $msi1 /l*v $logfolder\log1.log /qn msiexec /x $msi2 /l*v $logfolder\log2.log /qn msiexec /i $msi3 /l*v ...