command-line

DOS batch command to read some info from text file

Hello All, I am trying to read some info from a text file by using windows command line, and save it to a variable just like "set info =1234" Below is the content of the txt file, actually I just need the revision number, and the location of it is always the same line 5, and from column 11 to 15. In the sample it's 1234, and I am wonde...

Eclipse Plugin that Opens a Command Line in Eclipse

I'm looking for an Eclipse plug-in that shows a system (independent) command line in a view that is ideally synchronized with the current project's local path. So basically a shell within Eclipse. The reason for this is to be able to execute custom build commands and script faster than specifying them as launch configurations or having ...

how to make the batch file wait until another batch file completes execution?

how to make the batch file wait until another batch file completes execution? let me explain with an example. echo hi >r.txt echo some piece of code >>r.txt start ar.bat echo some piece of coe >>ar.txt i want the code after start ar.bat to execute after this batch file exits .. i have tried without start it works but i want t...

How do i make a "system call to tar files(along with exclude tag)" to work in Perl

This is the system call, i am making right now in perl to tar the files system("${tarexe} -pcvf $tarname $includepath") which works fine. $tarexe -> location of my tar.exe file $tarname -> myMock.tar $includepath -> ./input/myMockPacketName ./input/myPacket/my2/*.wav ./input/myPacket/my3 ./input/myPacket/in.html Now i want to exclu...

Vim: Pipe selected text to shell cmd and receive output on vim info/command line

I want to pipe the selected text to a shell command and receive the one-line output from this shell command on the vim info/command line? What I'm really trying to do: Pipe the selected text to a pastebin-type shell command and I want to receive the output of the shell cmd (which is the http link to the pastebin). Is this possible? ...

Hiding the Command Console from a MFC dialog application

Hi, I have a MFC dialog based application in which I use ::system() function to physically open a text file. When I do it the command console also opens. How can I hide the command console so that it doesn't pop up when I'm opening the text file? Thank You!!! ...

Patterns for wrapping a command line tool in another language

I'm currently writing some Java to wrap around an extensive command line tool. It feels like I'm writing a lot of similar code. I'm wondering if there are any established patterns for wrapping command line tools - passing arguments and handling output and so on. Specific examples in Java would obviously be great, but any general sugges...

Memcache textual protocol cheatsheet ?

Memcached interface is implemented using a textual protocol. Sometimes it's very useful to be to fetch data stored on your remote server simply by invoking netcat with some shell kung fu, for example: To download the XML result of your nightly data crunching job you might run something like: echo "get 95ec6c7693ec53771c8a3fb1061562b8" ...

running SVN scripts of users with no password

Hi, I'm running SVN functions such as log from the command line. I'm using --username and --password attributes to authenticate the function. Unfortunately, my users don't have passwords and I'm don't know what value to provide in the command line for the password. the syntax is: --password ARG and I don't have any value. please...

Should I add the .NET framework directories to my PATH?

I sometimes need to run gacutil.exe or installutil.exe, etc. from the command line. Is it OK to add the .NET framework directories to my system PATH? If so, which ones should I add and in which order? ...

Exit to command line in Python

I have a script that I want to exit early under some condition: if not "id" in dir(): print "id not set, cannot continue" # exit here! # otherwise continue with the rest of the script... print "alright..." [ more code ] I run this script using execfile("foo.py") from the Python interactive prompt and I would like the script ...

Log on as a service right - add user command line

Is there a way to add a user via command line tools to the "Log on as a service right" in Windows XP/Vista? ...

Command-line input causes SyntaxError

Good Day, I have a simple Python question that I'm having brain freeze on. This code snippet works. But when I substitue "258 494-3929" with phoneNumber, I get the following error below: # Compare phone number phone_pattern = '^\d{3} ?\d{3}-\d{4}$' # phoneNumber = str(input("Please enter a phone number: ")) if re.search(phone_...

Pass potentially infinite number of arguments to array except a single numeric variable in a PHP command line script

I'm trying to make a PHP script that will take a potentially infinite number of URLs from the command line as arguments. I also need to pass an argument that only has a single numeric value possible (to specify timeout), e.g.: ./urltest.php 60 url1.com url2.com url3.com I'm not exactly sure how to specify argv[1] to be a single numeri...

How to get full path of a given path

I have a variable define as: set filePath=".\file.txt" I'm writing a windows batch file. Need to convert the path stored in variable 'filePath' to its fullpath (physical path). How can I get the full path of this path? Please help! ...

How can I make a GUI frontend to a command line tool in OSX?

I'm dying to know how I can make a GUI for ffmpeg and jhead in OSX. I've been looking for a solution for a while and thought you, stackoverflow's users, could help me. Maybe you know some document I haven't come across of or, better, a tutorial to make a GUI. I love those two tools but I like the simplicity of drag/drop operations. Not...

Batch File - REN command's ErrorLevel returns 0 even on failure

This is related to my earlier question. ren "C:\Temp\%%A" "%%A" if errorlevel 0 ( "C:\Program Files\7-Zip\cmdline\7za.exe" a -tzip -mx9 "C:\temp\Zip\%%A.zip" "C:\temp\%%A" Move "C:\temp\%%A" "C:\Temp\Archive" ) In the above, the IF evaluates to true always, even if REN command fails. The idea is...

command line tool for XML digital signing

Are there command-line tools for XML digital signing? I have found one here: http://www.codeproject.com/KB/security/xmldsiglic.aspx but it needs .NET Framework and i would prefer it to work without .NET ...

Passing custom info to mongrel_rails start

One thing I really don't understand is how I can pass custom start-up options to a mongrel instance. I see that a common approach is the use environment variables, but in my environment this is not going to work because my rails application serves many different clients. Much code is shared between clients, but there are also many diffe...

How do I communicate with an unrelated process using its command line interface?

I'm trying to write a C++ program in Linux that communicates with a chess engine via its command line interface. Chess engines have standard protocols like UCI so, if I could write this, I could use different chess engines interchangeably. My C++ program should start the chess engine, send it a command, get the output, send it a comma...