command-line

Generate a log from all commits I've done in a day (or in an specific date) using CVS (log or history)?

I have to use CVS in my work and at the end of the day, I need to generate a report in an internal enterprise system. I write meaningful comments in all my work. I would like to do a cvs log or cvs history, with only the comments from each file I have commited to the repository (a solution using only command line, so I could automate ot...

Vim colorscheme change

I'm having difficulty getting my colorscheme to change. I've opened both ~/.vimrc and /usr/share/vim/vimrc and added: colorscheme desert ...and nothing. I noticed the color schemes are here: /usr/share/vim/vim72/colors/desert.vim (...along with a bunch or others) which seems like the wrong place so I: cp /usr/share/vim/vim72/color...

Getting max resident/working set size of Windows program from CLI, and user & system run times?

On Linux and Mac OS X, I can run a command from the CLI using the "time" command (not the bash shell built-in command time) and get not only the elapsed run time from start to finish, but many other statistics as well. For example on Mac OS X: % /usr/bin/time -lp /usr/bin/wc PS1-01.m4v 6166365 46283357 1532034853 PS1-01.m4v real ...

how to get file create/update time in mercurial?

I'm writing my blog system(django), and my blog files are VCSed by mercurial, I want get files create/update time, how could I do this by using commandline or python? edit: this is a example: $ SOME_COMMAND xxx.txt 2010-12-13-04:12:12 2010-12-14:04:12:12 xyx.txt 2010-12-13-04:12:12 2010-12-14:04:12:12 xxy.txt 2010-12-13-04:12:12 2010-...

Difference between "command > log.txt" and "command 1>& log.txt" in Linux command shell?

Hi. When I run the command haizea -c simulated.conf > result.txt, the program (haizea) still prints its output to the screen. But when I try haizea -c simulated.conf 1>& result.txt, the output is now on the file result.txt. I'm quite confused about this situation. What is the difference between > and 1>&, then? ...

NDesk.Options: how to register required parameters correctly?

I am trying to utilize the OptionSet class in the following way: string resultsFileName = null; bool isHelp = false; var p = new OptionSet() { { "r=|resultsFile=", "The file with the results", v => { resultsFileName = v; } } { "h|help", "Show this help", v => { isHelp = (v != null); } }, }; try { p.Parse(args)...

how to implement GUI window or a frame for bash shell with wxwidget or wxpython

HI, guys. I want to develop a window or frame for the bash shell program. Even after trials with the code of the link given by Bryan (thank you so much!!), it still does not work. Basically, I use the code sample put by Anurag Uniyal. However, I have to deal with several processes (so one window for one subprocess call). I do not know ...

Automatization Build Server TFS 2008 (vs 2008)

I use VS 2008, Team Explorer and TFS. I'm looking to automate your builds by executing TFSBuild.exe command. I follow those steps: Open TeamExplorer, in VS2008, connected to TFS; My Team Project has a Build (named MainBuild) in Builds. Then, I do Query New build option. I fill the properties in window dialog opened: build Definition...

Python Noob - Silly Question? Works in Python Interpreter, not from CLI...

I am hoping this is a simple stupid noob mistake that can be fixed with the addition of a single line of code somewhere. I'm using pySerial to read in serial data from a USB port and print it out to standard output. I'm running Mac OSX 10.6. I open terminal and type "python", then the following: >>> import serial; >>> ser = serial.Seri...

.net command-line compiler mutiple projects

I need to build a batch file that runs on a directory and digs inside for suitable c# projects to compile. (and compile them of course). I don't know the name of the projects inside the directory. I can assume all project are in c# and written in VS2008 and above (if that helps). I could really use your help on this, thanks. ...

Merge/Combine two pdf using windows console

Hi, I'm searching for a Method to combine two (or more) PDFs to a new one. This i have to do with the comman-line in windows. I haven't found a simple programm that can do this. Has anyone an idea for a programm that can do this? Best Regards ...

parsing options in a config module

I use config module to store variables global to all modules. Is it a good place to parse the script arguments? (Note: config module is my own module, it just contains a bunch of global variables.) ----- config.py ----- from optparse import OptionParser parser = OptionParser() parser.add_option("-t", "--test", action = "store_true", de...

Would it be possible to jump between prev/next Terminal command prompts?

Hi, I'm using zsh in OS X Terminal.app and for quite a while, I've been longing for a way to jump back and forth between prev/next prompts in the terminal's output. One convenience with this would be to be able to review (and track errors at) the end of each command's output; eg. when you building stuff from source with ./configure; mak...

Prompting for a password in Haskell command line application

The following Haskell program prompts the user for a password in the terminal and continues if he has entered the correct one: main = do putStrLn "Password:" password <- getLine case hash password `member` database of False -> putStrLn "Unauthorized use!" True -> do ... Unfortunately, the...

PHP CLI + Ajax for web terminal

I'm trying to determine the best approach to providing an Ajax based terminal using PHP. I haven't made an attempt at writing it yet but having rolled the idea around, the only way I could see it possible, would be 2 scripts: Script 1; handles Ajax communication between server and client browser. when a request is made to use the termi...

Why do I have to explicitly add perl before the script for getops to run properly?

When i run my script like so: C:\>perl script.pl -f file It works fine. But, if I just do: C:\>script.pl -f file then I don't get any errors but getopts doesn't assign anything to $opt_f This works just fine on perl 5.8 Windows XP, but it doesn't work on perl 5.12 on Windows 7. There aren't any other versions of perl installed (its...

How to programmatically merge text files with potential conflicts (ala git or svn, etc)?

As part of a larger project, I want the ability to take two bodies of text and hand them to a merge algorithm which returns either an auto-merged result (in cases where the changes are not conflicting) or throws an error and (potentially) produces a single text document with the conflicting changes highlighted. Basically, I just want a ...

glassfish asadmin error

Hi: I am trying to start the GlassFish Server from the command line: I typed in the following command: asadmin start-domain -verbose or asadmin start-domain domain1 or asadmin start-domain I'm looking over the error output. I see this first: java.io.FileNotFoundException: C:\Program Files\Sun\ SDK\domains\domai...