command-line

Trying to store the out of a command to a variable and trying to match in batch file

I am trying to set variable to a registry path. And then querying a registry and trying to match with the variable.If both are same then goto execute. But for some reason Im getting error and looks like there is some problem with this command set var=HKEY_LOCAL_MACHINE\System\x IF reg query==var GOTO EXecute ...

Windows Mobile, file associations and command lines

I've created a Windows Mobile application that opens, edits and closes a data file format. There're a couple of features I'd like to implemenet but I'm not sure how to go about it. Create a file association so my data files have a custom icon. Process the command line (if there is one) of my application so the user can select a data f...

AIX (vs) Unix commands

I need all the Unix commands which are specific to AIX machines. For e.g.: for Unix top is equivalent to topas in AIX. I need the list of similar commands. Where can I find it? Is there any documentation for this? ...

Remote execution process in batch mode

The following script is invoking the excel batch file in the remote machine. The batch file will open the excel workbook. D:>psexec.exe \Host_name D:\Excel.bat For the above case excel is opened in the background (process) but the workbook is not opened Is there any way to open the excel book in the remote machine? ...

How can I obtain unmodified command line arguments to "wrap" another command line tool?

I want to write a script foo which simply calls bar with the exact same arguments it was called with, using Bash or Perl. Now, a simply way to do this in perl would be #!/bin/perl my $args=join(' ', @ARGV); `bar $args`; However, the values in ARGV have already been processed by the shell, thus if I call foo "I wonder, \"does this...

ls command: how can I get a recursive full-path listing, one line per file?

How can I get ls to spit out a flat list of recursive one-per-line paths? For example, I just want a flat listing of files with their full paths: /home/dreftymac/. /home/dreftymac/foo.txt /home/dreftymac/bar.txt /home/dreftymac/stackoverflow /home/dreftymac/stackoverflow/alpha.txt /home/dreftymac/stackoverflow/bravo.txt /home/dreftymac...

TFS Manual Mstest Publish Results?

Following a MSDN web page, I am trying to manually run mstest within my tfsbuild.proj and put the results into the pass/fail logic so the build will fail if this particular test fails. It's kind of like running a FxCop or something else from CMD and capturing a "0" or "1" and force-fail the build. MSTest /testcontainer:test.dll /publish...

Process.Exited event is not be called

Hi all, I have the following code snippet to call into command line: p = new Process(); ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName = "cmd.exe"; psi.Arguments = "/C " + "type " + “[abc].pdf”; psi.UseShellExecute = false; psi.RedirectStandardInput = false; psi.RedirectStandardOutput = true; psi.CreateNoWindow = true; p...

Is there a more pythonic way to open a file if given one as an argument or stdin if not?

I'm trying to write a python script which follows the common unix command line pattern of accepting input from stdin if no file name is given. This is what I've been using: if __name__ == "__main__": if len(sys.argv) > 1: stream = open(sys.argv[1]) else: stream = sys.stdin Is there a more pythonic way to do th...

How can a console application (e.g. Java) recognize the source of the 'standard input' stream?

If I run 'python' on the linux command line, and I don't provide any command line arguments, the program displays a welcome message and waits for user input. I would assume that under the hood, the program sends the message to the 'standard output' stream and performs a blocking read on the 'standard input' stream. If, however, I invoke...

Replacement for Vern Buerg's list.com in 64 bit Windows 7

I would like to find a replacement for list.com, specifically the ability to accept piped input. For example: p4 sync -n | list which accepts the output of the perforce command and displays the results in the viewer/editor for manipulation or saving. I know that I would send the output to a file and then open the file in the viewer/ed...

Is it possible to have the name of the executable without the path?

Hi I'm trying to use the name of the executable and an usage string, I'm using argv[0] for such purpose but instead of the name of the executable itself it gives me the complete path to it. Is there any way to get only the executable name? ...

Find missing numbers in continuous filenames (advanced ls & find)

Let's say I have a script that generates incrementing folder names over time (100, 101, 102, 103, 104, etc...). These folders are synced between machines and there is a chance of creation failure for any given folder on system 2. System 1 is always in sync: 100/ 101/ 102/ 103/ 104/ etc... System 2 may have errors: 100/ 102/ 103/ etc......

Why is argc an 'int' (rather than an 'unsigned int')?

Why is the command line arguments count variable (traditionally "argc") an 'int' instead of an 'unsigned int'? Is there a technical reason for this? I've always just ignored it when trying rid of all my signed unsigned comparison warnings, but never understood why it is the way that it is. ...

Running a Java Class from a Jar thru a command line

I have a jar file with several classes which have static main methods. Can I execute them inside the jar from the command line? If not, can I execute them one by one? ...

Apache2, PHP5, and Interbase/Firebird on Windows 2003/XP

I have recently upgraded from Apache 1.26 and PHP 4.3 to 2.2.11 and 5.2.9 respectively. With my original setup I had a scheduled task set to run every Sunday for a weekly newsletter. It would connect to my database (Interbase/Firebird) to find out what events were opening for the following week and get the list of addresses the email wil...

Running xulrunner multiple times concurrently

We have an xulrunner application that is running as a background html to pdf converter. This is essentially a commandline application and shows no user interface. However, xulrunner defaults to trying to share profiles and instances of the application. How can we run multiple instances of the application concurrently without hitting prof...

log file creation problem in unix

i have command ccv this will output as below Your Project : gdgdd750V64OG , Building Block : cgd9gdd . if i do ccv | awk '{ print $9}' cgd9gdd now i am tring to create a log file by running a build process & tee log_`date +%Y%m%d%H%M%S`_`ccv | awk '{ print $9}'` but this is not creating the log corrrectly. ins...

Can the Unix list command 'ls' output numerical chmod permissions?

Is it possible when listing a directory to view numerical unix permissions such as 644 rather than the symbolic output -rw-rw-r-- Thanks. ...

Get Last file Commit Date from SVN

Noob to Subversion, so please bear with me. Is there a way to get the last commit date for a file from the command line? ...