terminal

Why does Ruby's ri not return to a bash command prompt (maybe Unix question)?

When I execute ri ... in a terminal on my Mac, I get, maybe, 50 blank lines, then the output I'm expecting, then a last line: (END) , with (END) displayed with white letters on black background. I am not returned to bash, however -- ri is still running, and I can't enter anything. Also, why all the blank lines? What's up? Cary ...

Dynamic terminal printing with python

Certain applications like hellanzb have a way of printing to the terminal with the appearance of dynamically refreshing data, kind of like top(). Whats the best method in python for doing this? I have read up on logging and curses, but don't know what to use. I am creating a reimplementation of top. If you have any other suggestions ...

What is the key combination to send NUL byte from a terminal?

This may sound ridiculous but I need to send something like <policy-file-request/> followed by a nul byte from a terminal to a XML socket server. I am using PUTTY but I tried all sorts of combinations like \0 or /0 or \u0000 but to no avail. I'm wondering if there is a specific key combination for this or am I messing up somewhere? ...

In linux, how can I test whether the output of a program is going to a live terminal or to a file?

When you use git it seems to magically know whether standard out is going through a pipe or into a file vs when it is being displayed to the console. For example, if you have colors enabled and you do git status it will colorize the output for different categories of files being listed. However, if you do git status | less or ...

problem with ImageMagick And Java Runtime Exec

I Have a bit of a strange problem no java expert i know could solve .. i need to used imagemagick on my application to make the emails on my website converted to images so no pot can take the emails easily .. the problem solved with image magick command line as following convert -size 200x30 xc:transparent -font /home/emad/TITUSCBZ.TT...

Create php file with content from terminal

Hi there. I was wondering how, for example, cakePHP can use the terminal/command line to create files and put content in it. I guess they use some kind of template for the content but how do they do it? I know that you can create controllers and so on with it. Anyone know how it's done? / Tobias EDIT: I've been searching and searchin...

COM port terminal program

Hi, I have developed an embedded application which requests status information from a device down a communications channel. My customer requires that these will be sent with a specific time period, so what I am looking for is a PC terminal application which can send a text string command repeatedly at a set interval over a period of ti...

In UNIX can I use a system call to pass a command to a running terminal in a new tab?

Specifically, In OSX 10.6 from a system call, I want to open a file for editing with VIM in a preexisting terminal (i.e. Terminal.app) by opening a new tab. Of course I can open a new instance of terminal /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal -e vim MyFile And, of course I can figure out the PID of the runnin...

Best Method/App for batch posting xml data to a php script

Hi, i've got a website that receives Posted XML data from a third party. I'm looking for a method so I can batch post a number of XML files to this script for development/debugging purposes. I have built a php script that loops through an array of files and uses curl to post each file separately. However due to the number of files i wi...

Is there a text based mysql UI?

I don't mean the standard mysql-client CLI, but rather something similar to what midnight commander is to filesystem management. The simple command history of the basic cli is not bad but really doesn't cut it when testing more complex query, and the layout of the data isn't that great. PHPMyAdmin is useful and all, but it's ugly and req...

erasing terminal output on linux

Hi, I was writing a command line program which will have a status bar, much like wget. The main problem I'm facing is: how do I delete what I've already sent into stdout/stderr? I had on idea: use the backspace char '\b' and erase the output I've sent. Is that the best way? Is it the only way? Is there a better way? PS: I don't want ...

Linux: How would I pipe text into a program properly?

I've looked but can't find anything. A program for example, a TTS I use lets you do the following: ~#festival -tts | echo "I am to be spoken" Which is really nice, but for programs I use such as hexdump, I don't know how to pipe text into it. I can REALLY use some of these things, some examples I tried (but failed) are like so: ~#gte...

Automating terminal login with DSA key

How would I go about doing this on the terminal? sftp then asks me for a password. how do I include my DSA key so that I do not have to use the password? ...

Keybinding move word in JRuby irb on OSX

Similar to this question, except in JRuby (it works in MRI Ruby). Alt-left prints a "b" in my console. Very annoying! To clarify, I've setup my terminal as described in this article, mapping option-left to escape-b. ...

Integrated Terminal Window in Netbeans?

I recently started using Netbeans and its capabilities have surprised me but there is a missing feature which keeps me from switching completely to Netbeans. I use the Terminal all the time and it is a pain to switch from the Netbeans window to the Terminal one. Is there a way to have a terminal window embedded into the Netbeans IDE (m...

Prevent a console app from closing when not invoked from an existing terminal?

There are many variants on this kind of question. However I am specifically after a way to prevent a console application in Python from closing when it is not invoked from a terminal (or other console, as it may be called on Windows). An example where this could occur is double clicking a .py file from the Windows explorer. Typically I ...

Determine if user is on server OS

Hi. I need a way to determine if user is on server OS or is using terminal connection (remote desktop) to view the site. I need this to turn off all animations and other stuff. The best i can do is to determine os from UserAgent, but there is no difference between Windows 7 and Windows Server 2008. I can check color depth on user machin...

Detect Client Computer name when an RDP session is open

Hey all, My manager has pointed out to me a few nifty things that one of our accounting applications can do because it can load different settings based on the machine name of the host and the machine name of the client when the package is opened in an RDP session. We want to provide similar functionality in one of my company's applica...

Terminal: Opening the current path in a window?

Often times, I find myself navigating very deep into a directory and wanting to open the graphical window (nautilus) for various reasons. So the question is simple: After doing, cd sampledirectory cd sampledirectory2 How can I open this location in a GUI? ...

dyld: Library not loaded error when running command in terminal

Hi, When running some commands in the terminal, I get the following error message dyld: Library not loaded: /opt/local/lib/libjpeg.62.dylib Referenced from: /opt/local//lib/libTIFF.dylib Reason: no suitable image found. Did find: /opt/local//lib/libjpeg.62.dylib: can't map /opt/local/lib/libjpeg.62.dylib: can't map Trace/B...