Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
46 views

How to rename and move files to new directory

I would like to rename a file that is uploaded to another server from extension .txt to .txt_mvd and move to a different directory for archiving in a Windows batch mode. Can anyone help with what the ...
1
vote
4answers
136 views

bash script to delete old files older than x days with subdirectories

Hi I'm new to scripting and I'm trying to delete a ton of files older than x days Now I have a script to do that find /path/to/files* -mtime +10 -exec rm {} \; But this will also delete the ...
0
votes
1answer
22 views

Obtaining Iptables info using a script

I have an iptables rule and I have to write a script that gets the numbers of packets and bytes target for that rule. I know that that command iptables -L -v -x shows that info, but I don't know how ...
0
votes
1answer
62 views

Logoff and then sleep in Windows 7

I have a habit to logoff and then sleep the computer in order to eliminate boot time but restart all user programs. I have to click logoff, wait for the login screen and then click sleep. I wonder if ...
1
vote
1answer
77 views

How to change color of Conky text via file/script?

I have a file which contains one word, "green", "yellow" or "red" (this file is updated via a cron job. I would like to use that color to display text in Conky. The actual text would stay the same, ...
2
votes
2answers
115 views

Sending commands to parent tmux session from vim

I have a split window setup with vim and Lynx in tmux. I'm trying to build a script so that I can send a custom command to vim which will save the script I'm working on, switch focus to the Lynx pane, ...
0
votes
1answer
35 views

how to find cells that have a certain text in open office's calc (excel might work also)

I need to calculate averages on my expenses spreadsheet, so I figured out I could do something like this: - get all cells that have the text "electric bill" - get the cell at the right of that one, ...
-1
votes
1answer
26 views

Command line option for one line of program

Interpreters for scripting languages and suchlike often provide an option to specify one line of program on the command line itself. For Perl, this option is -e; for Python it's -c. Which of these is ...
0
votes
2answers
58 views

How to issue an rsh command to run in the background from a batch file?

How to issue an rsh command to run in the background? Example: Within a (Windows) batch file I call rsh 10.1.1.2 -lroot /etc/rtcinst/myscript.ksh, which runs on a remote unix machine. This script ...
0
votes
0answers
186 views

Form macro in LibreOffice Base

I have a form in a LibreOffice Base document with a button on it. I want to display a query when the button get's pressed. How do I do it? I have tried using the form editor to link a macro to the ...
0
votes
0answers
75 views

Lucid linux importing images to Scribus

I'm using Scribus to write a textbook with lots of illustrations. I'm trying to use a script I found here to do this, but get errors: SyntaxError: invalid syntax File "<console>", line 1 ...
3
votes
5answers
142 views

How do I flip the line orders of a document with 500+ lines?

Line 1 Line 2 Line 3 Line 4 Line 5 should become Line 5 Line 4 Line 3 Line 2 Line 1 I need a notepad script to do this.
2
votes
1answer
21 views

When I use sudo to run a command, aren't the environment variables visible?

$cat test export var=value $source ./test $cat print.sh echo $var $chmod +x print.sh $echo $var value $sudo ./print.sh I get nothing. I was expecting to see value. What is going on?
0
votes
0answers
16 views

CScript Terminates before completing task

I am using the below with mods but ziping several Gb of info the last command is Wscript.sleep 2000. I have extended this to 20,000 and 200,000 but I use the script vor various diferent sizes. Is ...
5
votes
2answers
138 views

Powershell: Get inital character string from file name and create directory from string, then move files

I have a folder with the following file names: 00150005D201110172338427995.vpf 00150005D201110180005318058.vpf 00150013D201110180014448082.vpf 00150013D201110180022268098.vpf ...
1
vote
2answers
59 views

Get the user's home when sudo-ing in a script ran by root

In the manpage of sudo I found the -H option, but I don't seem to understand how it works. The manpage says: The -H ( HOME ) option sets the HOME environment variable to the homedir of the ...
0
votes
3answers
67 views

How can I use vim to automate this…?

I'm implementing hundreds of similar functions at the moment which take on the form String name(String arg1, String arg2, String arg3, String arg4) { ...
0
votes
1answer
96 views

House keeping removing 30+ days old files using shell script

So I have to bit of housekeeping for old backups and have the following code working on sh: find /home/backups -mtime +30 -type f -exec rm -rf {} \; This works fine as know the location/path, so ...
0
votes
2answers
65 views

Graphical Scripting Language

I would like to improve on the normal sleep inducing Powerpoint presentations with a moving graphical show for my "Bits to :- I'm sorry Dave" semester. So I am looking for a 3D graphics engine with ...
2
votes
1answer
226 views

How can I batch/mass create users for a Filezilla FTP server?

I recently inherited two FTP servers; both systems run Filezilla Server. One has a small user-base so creating users is a small task. The other is huge and needs to have 300+ users created. I estimate ...
1
vote
0answers
23 views

Solution for complex unattended installs?

What is the best way to do unattended installs of complex software (for example, advanced security systems such as dogles and/or network call-and-response) in win7? I've been looking at AutoIt, but it ...
1
vote
2answers
65 views

How can I merge two lists of emails to get rid of duplicates without any programming?

Say that I have two lists of emails, that look something like foo@example.com, john@doe.com, boo@boo.com boo@boo.com, jane@bigcorp.com and I need to put them together into one big list while ...
0
votes
3answers
41 views

Scripts shell recording playback

I hope this makes sense. I use 'scripts' to make copies of my ssh sessions for various reasons. When I access the logs via less, etc, I see this: Script started on Mon 12 Sep 2011 08:59:14 AM CDT ...
2
votes
1answer
150 views

Is it possible to prevent the win7 suspend state while using JDownloader or MiPony using script?

Does anyone know if there is a way to prevent windows 7 to go to suspend while using JDownloader or MiPony? using scripting ? perhaps powercfg command ?
0
votes
1answer
27 views

Maintain bzip2ed directories on Windows

I have a folder that, besides other things, has folders named after dates, e.g. 20110908 20110909 and so forth. Every night, I would like to run a tool that checks for all folders matching that ...
0
votes
1answer
84 views

Outlook Script to Check for Hidden Attachment

I've got an outlook script which shows you the recipient and prompts the user "Are you sure you wish to send this e-mail to XXX?" However, we have an issue with a plugin we use to send secure files ...
0
votes
0answers
33 views

Tool to draw in the Mac desktop

Is there a tool invoking which I can draw lines at random locations in the Mac desktop without disrupting the ongoing interaction on the active window? Some background context -- I want to take the ...
3
votes
1answer
221 views

Using launchd to kill and restart Finder in OS X

I'm trying to use a launchagent on login to kill the Finder, and then re-launch TotalFinder, to automatically apply the colorsidebar mod for OS X 10.7 (the mod can be found here). If I use the ...
4
votes
1answer
235 views

How to execute a script on sleep, hibernate, resume, and shutdown

I keep alot of my classwork documents hosted on dropbox as well as my personal site for remote storage. This helps alot since I switch between an iPad, laptop and desktop, so there are no worries ...
0
votes
0answers
22 views

Creating install instructions for Firefox that add print button to toolbar

I'm deploying Firefox 5 out to some stubborn IE users and they;re missing the Print button in the toolbar. Is there any way to add this to my mozilla.cfg file so they start with the print button in ...
0
votes
1answer
50 views

Script that runs a command with 'exec' doesnt end until 'Enter' is pressed

We have a KSH script that runs a process using exec and hangs. We want to be able to run it automatically and keep it running in background. We tried this: ./myScript.ksh & However this left ...
0
votes
0answers
24 views

Eclipse Scripting

I would like to script Eclipse so that it can do some intelligent things for searches, find/replace, etc. I would also like to say, refresh the workspace or current project. Is there a plugin that ...
0
votes
1answer
199 views

Windows 7 won't recognize backup set can I script extracting the files in some other way?

The Windows 7 Backup/Restore created multiple backup sets and I was able to restore the oldest version, but not the most recent, which is not seen by the application. I do see all of the zip files ...
0
votes
1answer
63 views

Efficient way of handling file management?

So I work for this small company and what they currently have is a bunch of files on server being move from one place to another. They are in pdf, wpd, doc and xls format. Initially what happens is ...
3
votes
3answers
160 views

Is there a GUI type “choice” app for OS X? (similar to choice.com for PC)

I'm running a terminal script and I would really like to send option choices to the OS X GUI, similar to how choice.com works for Windows / DOS, but a GUI version. I know I can use applescript's ...
0
votes
2answers
66 views

After a clean system install, how can I script customisation?

After I install Windows 7 on a computer/laptop I have many tweaks/changes I want to make, for example, "Use Small Icons" on the taskbar and "Do not highlight newly installed programs" on the Start ...
1
vote
0answers
153 views

How to automate Inkscape export?

Currently I do this in a BAT file: Inkscape.exe --file "some.svg" --export-png "some_64.png" --export-width 64 Inkscape.exe --file "some.svg" --export-png "some_96.png" --export-width 96 Inkscape.exe ...
3
votes
1answer
59 views

Context Menu Items and command line programs

I am currently trying to create a context menu item so that you can click on an executable file and select a scan option from the context menu, a command line program will then be launched with the ...
2
votes
3answers
146 views

cmd.exe shortcuts and parameters

I have made a shortcut that opens cmd at a specific directroy How can I add a program to execute at the end of this statement? C:\Windows\System32\cmd.exe /k cd "C:\Program Files\App" I have ...
-4
votes
2answers
105 views

Shell scripting questions [closed]

What is the meaning of these three shell commands? # 1 grep "[a-zA-Z]" # 2 sort -u # 3 awk -F"," '{if($4 == "2" && $6 == "UPD-LOC" && $7 == "OUT"){ print ...
0
votes
1answer
67 views

How to get Quicklook to open shellscript as source

I typically have a set of shell scripts with no extensions. Something like: git-completion git-flow git-addremove ..etc.. All these script are written in bash. When I use Quicklook on them it shows ...
1
vote
2answers
163 views

running PowerShell's Invoke-Item with a switch

I'm trying to make a PowerShell script to launch programs after I boot up my machine. I'm taking things out of the registry's "run" area and putting them in the script in the order that I want and ...
2
votes
3answers
549 views

Run a script when Windows resumes from suspend/hibernate state?

Is there a way to have Windows (XP, Vista and 7) run a script when a machine returns from hibernate/suspend mode? It would be okay with me if the script runs after the user unlocks a locked session ...
0
votes
1answer
52 views

EXCEL: Creating graphics controllable by events in spreadsheet?

I am wondering if there is way to create or import graphics in MS Office Excel, and then control its properties by script. For example imagine a map of world on the right hand side and a spreadsheet ...
2
votes
3answers
108 views

How to capture the result of a regex-powered command in Vim normal mode?

I want to find the number of times 'x' is present in my file, so I submit %s/x//gn and get the correct answer. How can I capture the resultant count into a variable using vimscript on the ...
1
vote
2answers
149 views

Fast regular expression that checks the number of times a character appears on a line in Vim?

Suppose I have a pipe-delimited text file. I suspect that one of the columns might have an embedded pipe character ('|'). I know there are 8 columns in the file, and each row should have 8-1 = 7 pipe ...
1
vote
5answers
170 views

Port perl script to Windows

I have a great perl script I use to untar/unzip a tarball of a file, then correlate a dozen+ files for smart troubleshooting of a NAS system. Now people want to see a version for windows =/ I am ...
0
votes
0answers
276 views

How do i execute bash script with winscp?

I need to execute a script that has UID set. (its 4755). My problem is this http://winscp.net/eng/docs/script_commands#call If current session does not allow execution of arbitrary remote ...
2
votes
1answer
746 views

How to launch a command on network connection/disconnection?

I have a wifi connection that requires to authenticate using a web form once the wireless link is established. I know how to automate the authentication with a script that uses curl/curlIE. But how ...
0
votes
1answer
52 views

how to find recursively rar files AND rxx files and copy them with zsh

I have my download dir with many rar's and trying to move them. How would I do that.

1 2 3