Linux csh script going to Suspended (tty output) when running with & (bg)


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Linux csh script going to Suspended (tty output) when running with & (bg)
# 8  
Old 08-07-2014
I came across a very similar issue trying to run a minecraft server on linux a few years back.

This is also a java program that needs terminal I/O. I got around the issue using gnu screen.

This is quite nice as you can give each screen a unique name and then later use "-X stuff" to jam keyboard input to the backgroup process like this:

Code:
screen -p 0 -S minecraft -X stuff "$(printf "%s\r" "say SERVER BACKUP STARTING...")"


Last edited by Chubler_XL; 08-07-2014 at 06:10 PM..
This User Gave Thanks to Chubler_XL For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

>& >&! in /bin/csh

i am new player in linux what does mean ">& and >&!" in script or command line? thanks (4 Replies)
Discussion started by: abdossamad2003
4 Replies

2. Shell Programming and Scripting

Different output for awk command on Linux & HP-UX

I am using an awk command to extract a particular portion of a string. Below is the command and its output on a Linux system: oracle@host1:/tmp (/home/oracle) $uname -a Linux host1 2.6.32-279.39.1.el6.x86_64 #1 SMP Fri Nov 15 05:38:26 EST 2013 x86_64 x86_64 x86_64 GNU/Linux ... (7 Replies)
Discussion started by: veeresh_15
7 Replies

3. Shell Programming and Scripting

>& redirection not working within csh script

I'm having a strange problem with basic >& output redirection to a simple log file in csh. When I run this particular output redirection on the command line, it works, but then when I run the same output redirection command >& in my c shell script, I get a blank log file. Nothing is output to the... (5 Replies)
Discussion started by: silencio
5 Replies

4. Shell Programming and Scripting

Linux Platform - NDM Script - && Operator

Hi All, I have a requirement where i need to NDM 3 files from LINUX to Mainframe system & trigger a job in mainframe once the 3 files are transmitted successfully. I am getting an error message in the && operator (the code component where i am checking whether step 1/2/3 are completed). ... (2 Replies)
Discussion started by: dsfreddie
2 Replies

5. UNIX for Dummies Questions & Answers

What are these different tty processes(tty1,tty2..) running as root mentioned n the list below.

Hi, I need your help to understand about different processes(tty1,tty2,tty3...) running as root as shown below .What exactly these processes do? root@bisu-desktop:~# ps -eaf | grep -e tty -e UID UID PID PPID C STIME TTY TIME CMD root 761 1 0 10:30 tty5 ... (4 Replies)
Discussion started by: crazybisu
4 Replies

6. Shell Programming and Scripting

Command not found errors when running csh script

I am trying to find the number of files whose name starts with uni. Below is the code but it is giving error. :confused: #!/bin/csh FILES_NAME ='files_list'; FILE_NAME_PATTERN = 'uni*'; NO_OF_FILES; ls -l $FILE_NAME_PATTERN > $FILES_NAME ; NO_OF_FILES = `wc -l $FILES_NAME`; echo... (3 Replies)
Discussion started by: hiten.r.chauhan
3 Replies

7. Shell Programming and Scripting

What does this really mean? "tty -s && stty istrip"

I am having hard time understanding what this really do to the environment? I do understand this part "tty -s && stty " but not "istrip" # stty command is executed only if a tty is attached to the process. # stty istrip : Strip input characters to 7 bits tty -s && stty istrip I am... (3 Replies)
Discussion started by: kchinnam
3 Replies

8. Shell Programming and Scripting

simple CSH Script behaves differently on Solaris and RedHat Linux

I have a simple csh-script on a Solaris Workstaion which invokes the bc calculator: #!/bin/csh set shz=2 set zshift=5 set shzp=`bc -l <<END \ scale = 3 \ -1. * $shz + $zshift \ END` echo $shzp The result ($shzp) in this case is 3 (-1*2+5). It works fine on Solaris 8. ... (2 Replies)
Discussion started by: two reelers
2 Replies

9. Shell Programming and Scripting

TTY colors are screwing up my output

I have been trying to get the output of an ssh session pushed to file... the problem is that there are colors in the output, and when I view the file the colors show up as "^[00m" or other such various nonsense The weird part is that if I do this all manually, I have no problems, but if I try to... (0 Replies)
Discussion started by: jjinno
0 Replies

10. Shell Programming and Scripting

Stopped (tty output)

What is mean by "Stopped (tty output)", how can i get rid of it. (3 Replies)
Discussion started by: Chandu
3 Replies
Login or Register to Ask a Question