Ubuntu :: Output Data To Running Process In Terminal?
There is text based game in the Ubuntu repos called gomoku (just 5 in a row) it comes with the package bsdgames. The manual page [URL] lists an option (-b) to run it in the background. I want to try that and if I know how it works create a simple graphical front-end. When I start the program with:
Code:
gomoku -b
it starts and remains active, the terminal does not return to prompt which is OK as the command is not finished. The manual says the program reads from stdin, and this might sound stupid but how to get anything there?
I've tried to pipe an echo command to gomoku which works but ends the program after is receives input.
Code:
echo "black" | gomoku -b
just finishes. After that when you type another command like:
Code:
echo "justsometext" | gomoku -b
gomoku tells it expects either black or white as input. So it forgot the previous "black" because it is a new instance.
How do I pass text to an already running gomoku?
View 2 Replies (Posted: July 10th, 2011)
Sponsored Links:
Related Forum Messages For Linux category:
General :: How To Redirect A Terminal/tty Output To Other Terminal/tty
hello I tried to find a good subject but it was the best of mine, anyway I'll explain it here. some time I do some thing like installing a new application in Linux terminal of my office PC but it take a long time and I have to go home during its installation or configuration process that it is not good to cancel it.My current solution is abandoning the process until next day. I wanted to know is there any way to redirect an input and out put of a terminal to another one, if it works I can continue my abandoned process by ssh to my Linux office PC and redirect that terminal to my new remote sshed terminal from my home. Thank a lot for any help.
Posted: 12-14-2010, 09:52 AM
View 4 Replies!
View Related
Server :: Set Process To Output To Apache2 Directory?
it seemed like the most accurate place. Also apologies for any inaccurate terminology, I'm a bit new at this. Running Apache2 on top of Debian 5.0 Anyway, I have irssi set to output logs to a folder accessible by my web server. User permissions are all set up, so it writes to the folder just fine, but when I access the server index in a web browser (i.e., page that says "index of /[directory] at the top) I cannot see the the directory or the logs that irssi is making. I can ssh in and see the folders and files in the terminal, so they are being created. How can I set it so these are viewable through the web server? I tried restarting the server, no effect.
Posted: 08-13-2010, 12:01 AM
View 1 Replies!
View Related
Ubuntu Servers :: Www-data Run Process As Different User?
forums so I'm not sure this is the right place for this topic.So, my question/topic thing is:I have a PHP script that runs on an apache2 web server (www-data).From this script, i want to launch a process that stays alive all the time,ut the parent script keeps on going. So I think I will need to run a command like 'at' to put the process on a queue, and the script can continue and finish, without waiting for the process to stop. But it seems like I will need to run the 'at' command as a different user, because www-data stops the 'atd' process. I'm not sure about that. Does anybody know how this could happen?
Posted: June 23rd, 2010
View 2 Replies!
View Related
Ubuntu :: Find Out Which Process Uploads A Lot Of Data
Sometimes I notice that there is high upload speeds for 10 minutes or so. At the time of the screenshot I was sitting in a public wireless place, only chromium was open and I don't see any reason why there should be sustained upload speeds.Is there a GUI or CLI so I can find out which process uses the internet?
Posted: May 18th, 2011
View 1 Replies!
View Related
Programming :: Redirecting The Output Of Child Process To New Xterm?
I am developing a application. In this I fork() 3 childs(lets say child1 , child2, child3) . The parent is now waiting for some input from keyboard.Child3 is continously getting data from child1 and child2 using pipe which it then will print using printf.Now as the parent is waiting for input from user through keyboard while child3 is continously printing the data. I want to do it in different terminals.Can you please guide me how to proceed ahead so that on one terminal , the parent waits for input fromser while on other terminal child3 prints data.
Posted: 08-02-2010, 07:25 AM
View 1 Replies!
View Related
Server :: Mpstat Output Interpret And Process Info?
I've got a system that is maxing out CPU. Running "mpstat -P ALL 3 5" shows the following. Quote: 08:30:21 PM CPU %user %nice %sys %iowait %irq %soft %steal %idle intr/s 08:30:24 PM all 100.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1001.00 08:30:24 PM 0 100.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 1001.00 [code].... All 5 groups show the same. My first question is why would CPU0 be the only one with intr/s and the others do not? Info.The OS is RHEL 5.4 running as a VM on ESXi 4.1. Memory doesn't appear to be an issue, the system has 8 GB and its only using about 1.5 GB. Second question, I'm positive the process that is the problem is the tomcat process. Does anyone know a good way to see whats happening with a specific process?
Posted: 05-19-2011, 03:38 PM
View 6 Replies!
View Related
Ubuntu :: Output Data From Text File Into A Table?
I'm having a slight dilemma on reading data from a text file and outputting it into a table then displaying it. Basically I'm writing a shell script that takes information from text files then outputs the data into a table with 4 headings. The extracting of the data is fine, but creating a table i'm having problems with. My code extracts the data outputs the string to another file which works fineThe text file looks like this mr smith 1 purchase oct 2007 mrs smith 2 purchase nov 2006 i want it to look like this [code]....
Posted: 04-13-2010
View 7 Replies!
View Related
Ubuntu :: Data Could Not Be Written (Input/output Error)
i tried to rip a dvd last night and it got 98% done then said "Data could not be written (Input/output error)"here is the error log from brasero Checking session consistency (brasero_burn_check_session_consistency brasero-burn.c:1744) BraseroDvdcss called brasero_job_get_action BraseroDvdcss called brasero_job_get_action [code]....
Posted: October 18th, 2010
View 2 Replies!
View Related
Programming :: Getting The Name Of The Process That Sent Data To A Pipe?
I am trying to automate some directory naming when we're manually running some scripts and are using tee to direct the output to a file (log). Right now this is what we do Code: ./some_script.sh 2>&1 | tee /home/user/some_dir/logs/manual/some_script_20110216_1628.log As a matter of laziness and keeping the log files consistently named, I'd like to create a function to pipe it to so that it's doing all the naming How I envision the command running Code: ./some_script.sh 2>&1 | myfunc And what the logfile name should look like (and in the right directory) Code: some_script_20110216-1628.log I was thinking of adding a function to our profile to handle this. Just in testing I was trying to stream line right on the command line, but I'm having some difficulty in getting the name of the script that is pushing data over the pipe. Here is what I've tried Code: ./some_script.sh 2>&1 | tee $(cd ../logs/manual; pwd)/$0_$(date +%Y%m%d)-$(date +%H%M).log but that created a file named "bash_20110216-1628.log"
Posted: 02-16-2011, 03:38 PM
View 3 Replies!
View Related
Ubuntu :: Reattach PTS Or Process To Another Terminal?
There were a ssh session, but client side crashed and after reconnect, here is still pseudo terminal and process attached to it. Is there any way how to reattach the pts or reattach process to another terminal? (Please ignore screen or another terminal multiplexer, as long as I'm just curios if there is any solution of this situation, cause I use screen).
Posted: September 18th, 2010
View 8 Replies!
View Related
Programming :: Output Data To An Ascii Table?
I've got lines of data in the following format: space1=number of times error has occured space2=IP address space3=Error I've set this out nicely with printf and made it email me, the problem is - it's not entirely clear what each column/space is and the IP and occurances can sometimes seem confusing. Is there any (easy) way to output this into an ascii like table? There will always be 5 occurances, and the format will always be the same
Posted: 10-18-2010, 06:37 AM
View 1 Replies!
View Related
Ubuntu :: Keep A Process Running From Ssh
I recenlty set up a headless linux home server by my router will my spare computer parts. I have NFS and even a COD4 server running on it for my friends and me. Because the box is headless, I take controll over it with ssh and start the COD4 server from there, but the problem is, if I close the terminal I have the ssh running from, it closes my server, meaning my desktop needs to be up and running the entire time. That kinda ruins the point of my server So my question is, is there a way for me to run the command so that it will not close with the terminal AND that I can still send commands to the server.
Posted: May 21st, 2010
View 9 Replies!
View Related
Ubuntu :: Run A Java Process In The Background Of A Terminal ?
I am running Ubuntu 10.10, and I am trying to run a java process in the background of a terminal, so I can continue to use that terminal. Other applications will run in the background just fine, but when I run my java application, I cannot change the status of the process from "Stopped" after suspending it. Here is my command syntax, along with some commands I have tried and their outputs: There were [1]- entries, but I removed them for simplicity.
Posted: February 16th, 2011
View 4 Replies!
View Related
Ubuntu :: Save All Terminal Output To A .txt File?
I sometimes stick my neck out and provide somewhat detailed, and often risky, "Mr-fix-it" remedies for boot problems. Now, I know it's possible to amend each command with "whatever_command > whatever.txt" in which case it'll place the command output in a file in /home. But if you're directing someone to run a lot of commands as I did here is it possible to save the output of all commands to a .txt file without amending each command? Or is it already saved somewhere that I'm not yet aware of? I wouldn't be surprised if the latter were true, I just haven't yet found it
Posted: March 15th, 2011
View 4 Replies!
View Related
|