I'm a Windows user and would really like to have the power of the Unix command-line for things to speed up programming. (clean up datafiles, search for occurrences of things in files, file/folder operations/ etc.)
Now I know that using Cygwin and a few ports, I could use these command-line tools in Windows as well.
However, the idea of...
I'm trying to create a right-click context menu command for compressing JavaScript files with YUI compressor. My ultimate goal is to try to get this to run on a context menu:
java.exe -jar yuicompressor-2.4.2.jar -o <filename>.min.js <filename>.js
I know I can use the variable %1 to reference the file name being opened. I can't figure...
This is probably a stupid question, but how can I execute a shell command from my Cocoa app?
I have the command as a string "command", but can easily manipulate data as needed.
There is no need to get a returned output value.
...
I want to be able to run my Python project from the command line. I am referencing other projects, so I need to be able run modules in other folders.
One method of making this work would be to modify the Pythonpath environment variable, but I think this is an abuse. Another hack would be to copy all the files I want into a single direc...
I want to have output of Windows command-line program (say, powercfg -l) written into a file which is created using Perl and then read the file line by line in a for loop and assign it to a string.
...
I just realized my caps was on from working in SQL Server, ha.
Anyways, Im trying to write from
serverName.databaseName.databaseInstanceName.TableName
to
C:\FileName.xml
using bcp and I want to write only columns Col1 and Col2, could I get a little syntax help? I'm struggling over here.
Thanks,
Ted
...
I need to make a script that automates the following:
Read comma or tab separated values from the input file
Construct a command from them and run it
Get the command output, looks for substrings in it and update the log file based on the existence of a substring
I do this in Windows Server 2008, so I can do this in CMD or PowerShell ...
I'd like to write a simple command line proxy in Python to sit between a Telnet/SSH connection and a local serial interface. The application should simply bridge I/O between the two, but filter out certain unallowed strings (matched by regular expressions). (This for a router/switch lab in which the user is given remote serial access to ...
I am currently running a command and it is producing the compressed file. I need to store that zip file into c:\windows\abc.zip. Does anyone know how to do that?
MY current command is something like this:
cd %path% cdx.exe
I have tried specifying the path after cdx.exe but it doesn't store in that path.
It is running the exe but stori...
Bear with me, it's been a while. :)
What is a good way to validate command-line arguments passed to an MS-DOS batch script?
For example, here is what I want to do:
IF "%1"=="" throw "Missing 1st argument: Machine Name"
IF "%2"=="" throw "Missing 2nd argument: File Path"
...
We have a Windows Service application that can accept command line parameters like:
MyService -option
So far, when we want to start the service with a parameter, we either do it manually from the Service Properties dialog (in the Start parameters box) or with the command
sc start MyService -option
What we would like is a way to...
I tried a search and replace across all files in a directory as follows:
/usr/bin/perl -p -i -e "s/Else/Else FILE_WRITE(\"C:\\TestDir\\mes.txt","Message received");/g" *.scr
That is replace all occurence of Else with "Else FILE_WRITE(\"C:\TestDir\mes_.txt","Message received");"
But the replacement is seen to be as follow...
I have a Fitnesse.NET acceptance test suite that I want to run as part of my TFS/MSBuild CI build.
The suite contains some Fitnesse variables that I need to override when calling from the build process, eg:
!define ConnectionString {Data Source=...}
How can I override the variable values defined in the suite when calling the suite fr...
error CS0583: Internal Compiler Error (0xc0000017 at address 7C812AFB): likely culprit is 'IMPORT'.
An internal error has occurred in the compiler. To work around this problem, try simplifying or changing the program near the locations listed below. Locations at the top of the list are closer to the point at which the internal error occu...
I need to replace the ascii characters SOH and STX (start of header and start of text, ascii characters 1 and 2, respectively) in some really huge text files as quickly as possible... Is sed the way to go? What does that command look like?
...
I need to write a script that will give users info on a given Unix account (the same Unix server that the script lives on). Mostly thing kinds of things that are in the passwd file or available via finger.
PHP is in safe-mode, so I can't access the passwd file via something built into php like file_get_contents(). Also, because it's in ...
My Shell should understand PATH environment variable. It can be set and modified. It runs in two ways -interactive & batch mode. Shell is capable of taking more than one job like ls;ps;wc file;cal.
I know I will have to use execs, forks and pipes but just cant get started.
Thank you in advance.
Edited:
PS:Not a homework question. Newb...
Does anyone know a portable way for Python to determine a system's maximum command line length? The program I'm working on builds a command and feeds it to subprocess. For systems with smaller command line length maximums, it is possible that the command will be too long. If I can detect that, the command can be broken up to avoid exc...
Possible Duplicate:
Is there a way to the hide win32 launch console from a Java program (if possible without JNI)
When I run my java swing application in a batch file on windows, the console/command window remains open whilst my java application is running. This creates an extra window on my taskbar which I would prefer not to h...
I have the following folder structure:
FolderA
--Folder1
--Folder2
--Folder3
...
--Folder99
Folders 1 through 99 have files in them.
All I want to do is to copy ALL THE FILES into ONE FOLDER, basically do a FolderA copy, and wipe out Folders 1-99 keeping all the files.
I'd like to do it with Robocopy from cmd.exe if possible (Windo...