console

Calling Bash Commands From Ruby

How do I call console/bash commands from inside of a Ruby Program? Also, how do I get output from these commands back into my program?...

Best way to wrap rsync progress in a gui?

I use rsync to synchronize files to Windows clients in a server agnostic way. What methods are available to send the progress of rsync to the parent process for display in a gui progress bar? I imagine two or three choices exist. (1) Watch STDOUT (2) Watch rsync.exe log file, similar to unix tail (3) Watch rsync console output in memory...

UrlEncode through a console application?

Hi,normally I would just use: HttpContext.Current.Server.UrlEncode("url"); But since this is a console application, HttpContext.Current is always going to be null. Is there another method that does the same thing that I could use? ...

Using an ocx in a console application

I want to quickly test an ocx. How do I drop that ocx in a console application. I have found some tutorials in CodeProject and but are incomplete. ...

What is the best way to use a console when developing?

For scripting languages, what is the most effective way to utilize a console when developing? Are there ways to be more productive with a console than a "compile and run" only language? Added clarification: I am thinking more along the lines of Ruby, Python, Boo, etc. Languages that are used for full blown apps, but also have a way to r...

C# console program can't send fax when run as a scheduled task

I have a console program written in C# that I am using to send faxes. When I step through the program in Visual Studio it works fine. When I double click on the program in Windows Explorer it works fine. When I setup a Windows scheduled task to run the program it fails with this in the event log. EventType clr20r3, P1 consolefaxtest....

Vista Console App?

I'm doing a fair bit of work in Ruby recently, and using ruby script/console Is absolutely critical. However, I'm really disappointed with the default Windows console in Vista, especially in that there's a really annoying bug where moving the cursor back when at the bottom of the screen irregularly causes it to jump back. Anyone have...

Good resources for writing console style applications for Windows?

For certain programs nothing beats the command line. Unfortunately, I have never seen good documentation or examples on how to write console applications that go beyond "Hello World". I'm interested in making console apps like Vim or Emacs. Well not exactly like Vim or Emacs but one that takes over the entire command prompt while it is...

How can I overwrite the same portion of the console in a Windows native C++ console app, without using a 3rd Party library?

I have a console app that needs to display the state of items, but rather than having text scroll by like mad I'd rather see the current status keep showing up on the same lines. For the sake of example: Running... nn% complete Buffer size: bbbb bytes should be the output, where 'nn' is the current percentage complete, and 'bbb...

.NET Console Application Tab Completion

Any ideas on how to implement tab completion for a .NET (C#) Console Application? And I mean within an application that is run and then loops for user input (like if you run ftp.exe without any arguments), like this: string line = string.Empty; while (line != "exit") { //do something here ...

C# Console?

Does anyone know if there is a c# Console app, similar to the Python or Ruby console? I know the whole "Compiled versus Interpreted" difference, but with C#'s reflection power I think it could be done. UPDATE Well, it only took about 200 lines, but I wrote a simple one...It works a lot like osql. You enter commands and then run them wit...

Console.WriteLine and generic List

I frequently find myself writing code like this: List<int> list = new List<int> { 1, 3, 5 }; foreach (int i in list) { Console.Write("{0}\t", i.ToString()); } Console.WriteLine(); Better would be something like this: List<int> list = new List<int> { 1, 3, 5 }; Console.WriteLine("{0}\t", list); I suspect there's some clever way ...

Java, UTF-8 and Windows console

We try to use Java and UTF-8 on Windows. The application writes logs on the console, and we would like to use UTF-8 for the logs as our application has internationalized logs. It is possible to configure the JVM so it generates UTF-8, using -Dfile.encoding=UTF-8 as arguments to the JVM. It works fine, but the output on a Windows console...

Where is the console API for WebKit/Safari?

WebKit/Safari supports the console object, which is similar to what Firebug does. But what exactly is supported? There is a console documentation for Firebug, but where can I find the console documentation for Safari/WebKit? ...

Reset screen point to the top of screen in Windows & Linux console

I have a little routine that's run under Linux and Windows written in C and displays output on the console. I'm not linking in any form of curses or anything like that. Currently I clear the screen using #ifdef __WIN32 system( "cls" ); #else system( "clear" ); #endif Then I have a bunch of printf statements to update the status. ...

How to add a Timeout to Console.ReadLine()?

I have a console app in which I want to give the user x seconds to respond to the prompt. If no input is made after a certain period of time, program logic should continue. We assume a timeout means empty response. What is the most straightforward way of approaching this? ...

Is there a better Windows "Terminal" application?

I loath working on the command line in Windows, primarily because the terminal application is wretched to use compared to terminal applications on linux and OS X. Major complaints No standard copy/paste. You have to turn on "mark" mode and it's only available from a multi-level popup triggered by the (small) left hand corner button. ...

How to save the output of a console application

I need advice on how to have my C# console application display text to the user through the standard output while still being able access it later on. The actual feature I would like to implement is to dump the entire output buffer to a text file at the end of program execution. The workaround I use while I don't find a cleaner approach...

What are your most important console aliases?

Which one alias would you choose to keep if your .bash_alias/.bashrc/etc could only contain one line? ...

How can I start an interactive console for Perl?

How can I start an interactive console for Perl, similar to the irb command for Ruby or python for Python? ...