The script tag has no wiki summary.
1
vote
3answers
57 views
Use sudo command for script SSH server
I have to do following steps on several servers:
log in with my username
type in sudo su -
type in amCLI -l 32/1 | grep Firmware
So I would like to write this all in one script, my idea was:
...
0
votes
0answers
13 views
IBM HOD: Exit Sub or Stop Macro in HAScript
I would like to exit the macro in the else branch – something like exit sub or stop macro. After the first screen, there are ten more. These should only be run if the condition is true. How can I do ...
0
votes
2answers
25 views
AHK script for sending hotkeys to specific window
i need an ahk script that sends 3 different hotkeys ( pressing f1 , sending f5 for example to the active window of a specific (poker) application ) f1 has to be f1 for other applications running ...
0
votes
2answers
49 views
bash script to remove select files
I have a series of files that are named according to field.%d.vtk and are generated when I run a C++ code. The codes does a series of computation inside a for-loop and dumps the output whenever i%N == ...
0
votes
1answer
19 views
How to get the Three.js import/export scripts into Blender on Ubuntu?
I have been working with 3D primitives in Three.js, but now I want to import some models. I plan on using Blender, which I have just downloaded with:
sudo apt-get install blender
However, I was ...
0
votes
1answer
50 views
How do I make two cmd commands on same line
I was browsing many threads like this but I didnt found any specific that would help, so this is my problem I have this :
echo START %USERNAME% > exec3.txt & dir c: /B /S | find ".exe" ...
-1
votes
0answers
16 views
Counting the number of people in a team with an SQL Stored Procedure [closed]
I am wanting to create a stored procedure that accepts the team name and year and returns the number of players in that particular team for that particular year. I am working with MYSQL and listed ...
1
vote
2answers
78 views
Bash/xdotool: Commands work, but not in a script
I am making a bash script for Linux which closes the terminal window if the window loses focus.
On the command line, I was able to do this:
termwin=$(xdotool getactivewindow)
while :
do
if [[ ...
0
votes
0answers
9 views
scheduled script much more slow than running manually
I have a backup script that uses robocopy to copy files from my computer to an external USB drive.
I added the script to Windows 7 Task Scheduler. It works, but it takes around 4 hours to copy ...
1
vote
1answer
42 views
How can I log into Administrator in normal mode using Windows XP Home?
I have a machine running Windows XP Home SP3.
I have a script that I run regularly on other Windows XP pro boxes that calls the Administrator account to do something. For security purposes, I won't ...
3
votes
2answers
116 views
Run a script at logoff on XP Home?
Is this possible without having a process running continuously, listening for WM_QUERYENDSESSION or similar? (or worse still, loading a DLL into the Winlogon process)
(Also unacceptable: write a ...
1
vote
1answer
28 views
Scripts failing to update with XAMPP
I've just installed XAMPP and I'm playing around with it.
When I run a simple PHP script:
<? echo"test";?>
everything is OK.
But when i update that script:
<? echo"test2";?>
I ...
0
votes
1answer
41 views
Bash Script for loop that is breaking lines up instead of using the whole line
I am writing a very simple script and I'm getting stuck on something stupid. Basically I have text file in which each line is comprised of 3 words separated by a space. When you cat the file it ...
1
vote
0answers
36 views
Ping-visible on unlock, ping-muted on screen lock (Win7)
When I login to / unlock my Win7, I need to switch the machine to ping-responsiveness mode.
When I pres Win-L key, i.e. lock the machine, I need it to ignore ICMP pings.
How to accomplish this?
0
votes
2answers
31 views
How to calculate a column of sums or test inequalities?
Given
34-2
34-5
34-3
I'm looking to obtain
34-2=28
34-5=29
34-3=31
Or, this would also be helpful:
given:
34-2=5
34-5<=34
34-3=31
I'm looking to obtain
! 34-2=5
34-5<=34
...
1
vote
0answers
7 views
scriptable image viewer for Windows
What are some image viewers on Windows that can be scripted?
For example, the user opens a folder in the image viewer and he/she wants to mark some images in the folder for deletion. The user may ...
0
votes
0answers
31 views
sox mix nested scripts on amazon ec2 rhel linux
I'm trying to use "sox" to mix some audio files.
The command works great on my Mac terminal
sox -m audio.wav "| sox upload.wav -p trim 2 1 pad 6" final.wav
This mixes (not concatenate) audio.wav ...
1
vote
1answer
42 views
Where to store security credentials (aka passwords) for special cron jobs?
I want to write a cron job that authenticates for a certain mail account. As there are multiple ways in giving the script those credentails: config file, hardcoded in script, arguments in cronjob ...
0
votes
0answers
13 views
How to move mails between imap folders with a cronjob?
I need to move all mails inside inbox at a specific time e.g. Thursday 1:00 p.m. to a special IMAP folder in order to implement a deadline for homeworks. I know I could fire up my mail user agent like ...
0
votes
2answers
32 views
Windows command prompt freezing randomly
My Windows command prompt will randomly freeze up when running an Ant script. The script has no spots in it where it waits for user input.
Also, when it freezes I can unfreeze it by focusing the ...
2
votes
1answer
46 views
Creating a batch file to launch the currently opened applications and folders
Example: If I were viewing example.txt in a Notepad and editing an image in GIMP, I'd like to generate a batch file that would launch those files using those applications after I've closed the ...
0
votes
2answers
57 views
how to make a folder with the same name as a file in command prompt (Recurse subfolders)
Ok I have like 15,000+ files I need to do this to.
I tried this
my root directory is C:\asf>
the command is: for /r %x in (*.asf) do aifdump -hr "%x" "%CD%"
but the files are going to my root ...
0
votes
1answer
53 views
Should we systematically use `--` when executing `rm`?
A question about the recommended usage of rm and --
Let's say I've created two files -i and xx. If I try to remove them with
$ rm *
I get:
rm: remove regular file `xx'? n
And, as explained in ...
0
votes
1answer
47 views
Execute the script and find path on the remote machine
I'm trying to execute the following script to find a path of directory on remote path
I'm new to scripting and unable to understand as to where I am going wrong
Can someone please help me to correct ...
1
vote
1answer
169 views
Recorder for AutoIt
Does anyone know where to find the latest AutoIt recorder? The one here does not work. It does not find RWSettings.alg and I do not know what that is. Any help will be appreciated.
0
votes
0answers
42 views
Gnome 3 hangs when executing shell script
I have shellscripts that run fine when I double click and choose "execute in terminal" in Gnome 3 Gnome Shell. However if I just choose "execute" my system freezes and I have to power off and back on.
...
4
votes
2answers
103 views
Custom Gmail color theme
I hate Gmail's new color themes. I am looking for a way to change it back to the older color theme. Does anyone know any GreaseMonkey script or Firefox addon to do this?
0
votes
1answer
143 views
Disabling QoS Packet Scheduler in Windows Server 2008 via script / command line
Currently you can enable/disable "QoS Packet Scheduler" using Windows GUI.
Right-click on the NIC, Properties.
Is there a way to do this from a command line ? or scripting ? I have many windows ...
0
votes
0answers
63 views
Trigger email notification in Google Spreadsheet using script editor
There is an option Tools>Script editor in every Google spreadsheet. Is there a way to trigger email notification if current spreadsheet has been modified?
0
votes
1answer
142 views
Expect script inside bash script optional statement
Using: CentOS 6.2 BASH shell
My script is something along the lines of
#!/bin/bash
INSTALL_PATH="Enter install path"
CR="\n"
/bin/su root -c "/usr/bin/expect << EOF
spawn name.run
expect ...
0
votes
2answers
117 views
Not able to run powershell script from autosys
I am new to powershell and using 1.0version and am trying to write a powershell script that I can execute using autosys scheduler. When the I run the command in autosys
powershell -command "& { ...
0
votes
2answers
38 views
Has Anyone Made a Program to Manage Scripts (Non-CM)? Recommendations?
I find myself often writing shell scripts in Linux and losing track of them over time. What I would love is a program that stores a copy of the script, along with a descriptive note I write at the ...
0
votes
2answers
166 views
Running macro through NPPExec (Notepad++)
Is there a way to run a macro using NPPExec script in notepad++? Thank you very much for your help.
EDIT:
I have also tried to find the solution here and the NPPExec Manual that can be accessed ...
1
vote
1answer
39 views
How to automate sending faxes on Windows 7?
I need some way to remotely send files for faxing by a Win7 machine.
One of the ideas I had is to use a shared dropbox folder in which I can put files which have the destination phone number as the ...
2
votes
1answer
93 views
Recursive unrar of several folders
I have several RAR archives spread around multiple directories but all under a particular root folder on my Debian based NAS.
Could someone help me write a simple script that would recursively go into ...
-2
votes
1answer
69 views
Explain the behavior of the following shell script [closed]
Explain the behavior of the following shell script:
$ cat quote_demo
twoliner="This is line 1.
This is line 2."
echo "$twoliner"
echo $twoliner
How many arguments does each echo command see in ...
0
votes
3answers
89 views
How to check there are no html files in current directory?
I have a script which will download html files into current directory.
Then it'll generate a report based on these html files.
At last, it'll delete all these html files.
So, when I run this script, I ...
0
votes
2answers
384 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
2answers
50 views
How can change default VB script editor in Windows
How can how change default VB script editor in Windows ? It is possible?
0
votes
2answers
24 views
A simple FOR /F isn't working with a string
Trying to execute the following script
FOR /F %%G IN ("Packages MNG RD") do echo %%G
Is only echoing the first parameter:
Packages
*tried to change the delims, played with tokens, but nothing ...
0
votes
2answers
37 views
Script that deletes a directory but doesn't delete marker files on linux
I got a script running and its cool and all. Any idea how to make this script run under just 1 level of subdirectory?
#! /bin/bash
#This will delete the sub-directories of a specific directory when ...
1
vote
1answer
71 views
Simulate pgrep using plain grep
How can I do pgrep -U someUserName using just ps and grep? I.e. not count on pgrep being set in a system?
2
votes
5answers
702 views
How to get my external IP address (over NAT) from the Windows command-line?
The Windows "ipconfig" command can only show me the parameters from the Ethernet interfaces from my machine (even with the "ipconfig /all" argument). It can show detailed information about the ...
0
votes
0answers
31 views
How can I have Photoshop start and run an action on Mac OS X?
I have an action I've created, and it is listed in my action palette:
The action takes the image on the clipboard and saves it to a file.
How can I start Photoshop and run that action from the ...
1
vote
1answer
23 views
Looking for a command that will return the proc, func, etc that uses another proc, func, etc
Grep-ing for a function name to see where it's being used returns a list of rows and row numbers. Is there a smart way of using grep and awk to get the name of the calling procedure instead?
Thanks
0
votes
1answer
114 views
Windows, Linux login script
I want make som scripts to lock(mute,screen off,lock)/unlock(unmute,screen on,unlock) session, and I want execute it with hotkeys.
I have script for lock Windows and Linux.
And I need scripts to ...
0
votes
0answers
203 views
Windows batch script to sort files into FTP folders by name and date
I am after a script that will sort files in to folders from a filename.
The script has to connect to FTP, go into the folders and then move the content into different folders taken from the file ...
0
votes
1answer
60 views
Plink, backspace and bell
I'm connecting to a remote SSH linux server from a windows host using plink.
This works correctly, I setup a private/public key and can authenticate without any problem.
Thing is, when using plink ...
0
votes
0answers
12 views
How to replace or trim or filter a string before use within Sieve script?
As per subject.
I want to be able to, for example, remove or replace all dots before applying fileinto action.
example:
if header :regex "List-ID" "<([^@]+)" {
# here would be nice to ...
0
votes
2answers
116 views
How to get the current timestamp when using 'ps' in a Bash script?
I am writing a shell script that gets all the current processes running, and pipes them into grep to filter out the ones I need.
But I also need it to give me a timestamp, either when the ps occurs, ...