Sponsored Content
Top Forums Shell Programming and Scripting How 2 run same command across all open terminals Post 302521025 by mirni on Tuesday 10th of May 2011 03:37:23 AM
Old 05-10-2011
Thanks agama,

That's a slick solution there with SIGUSR1, that can be certainly put to use.

I also have had the feeling it cannot be done straightforward.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

what is the command to connect to remote terminals

what is the command to connect to remote terminals? (1 Reply)
Discussion started by: sendtorohitgupt
1 Replies

2. UNIX for Advanced & Expert Users

one command for all unix terminals

Hi, I am working in huge environment, I do type commands from my terminal window repeadly in all same setup unix environments. I am looking some kind of a terminal emulator or some simple program that will help me? basically if type command like 'ls' in one unix terminal window it should echo... (5 Replies)
Discussion started by: rgmekala
5 Replies

3. Shell Programming and Scripting

open terminal to run cmd using shell script

i want the shell script to open the terminal and in that terminal i want to run a command specified in the script... how can it be done... (2 Replies)
Discussion started by: chandrabhushan
2 Replies

4. AIX

How to open multiple virtual terminals to a single LPAR

I just wondering if there are ways to open multiple virtual terminal to a single LPAR. After I have use putty to login to the VIOS. I will use mkvt -id <LPAR id> to open console but if my friend want to open 2 second one, it will say, VT already connected. IS there a way to work this around ? ... (1 Reply)
Discussion started by: wingcross
1 Replies

5. Shell Programming and Scripting

How run simple command in xterm, and leave open?

I have written a simple script to show battery life remaining. I would like to be able to quickly view it with a predefined keybinding or launcher. xterm -e scriptname should do the trick but the xterm closes when the script finishes, not giving me chance to read the output. How can I keep... (3 Replies)
Discussion started by: spoovy
3 Replies

6. Linux

How to open a gnome-terminal in specific workspace and run script within it automatically upon login

OK this is a bit messy. I run Fedora with gnome on a compiz desktop, I have a script (userstart) that opens my 'standard' environment for all my machines when I login. userstart flips to a specific workspace and then opens the required applications in that workspace then flips to the next... (2 Replies)
Discussion started by: Bashingaway
2 Replies

7. Shell Programming and Scripting

shell script to run commands in different terminals

hi, how to write shell script that runs different commands(like:ls,ps,ls-l) in differnt terminals(each command should run in different terminal). my main motive is to run different 'c' program exe's available in different locations in different terminals. thanks sai (2 Replies)
Discussion started by: saidopdf
2 Replies

8. Shell Programming and Scripting

Script for telnet and run one command kill it and run another command using while loop

( sleep 3 echo ${LOGIN} sleep 2 echo ${PSWD} sleep 2 while read line do echo "$line" PID=$? sleep 2 kill -9 $PID done < temp sleep 5 echo "exit" ) | telnet ${HOST} while is executing only command and exits. (5 Replies)
Discussion started by: sooda
5 Replies

9. Shell Programming and Scripting

Open gnome-terminal with multi tabs and automatically run a script in each tab

Hi All , i am trying to create an alias to open a new gnome-terminal and run some commands in each tab & to have a specific name for each tab i am using csh , tried this command gnome-terminal --tab -t "s1" --tab -t "s2" --tab -t "s3" --tab -t "s4" it opened 4 tabs but the title didn't... (0 Replies)
Discussion started by: Assem
0 Replies
ttytype(1)						      General Commands Manual							ttytype(1)

NAME
ttytype - terminal identification program SYNOPSIS
type] DESCRIPTION
automatically identifies the current terminal type by sending an identification request sequence to the terminal. This method works for local, modem, and remote terminal connections, as well as for the and terminal emulators. Once the terminal has been identified, prints the terminal's type to the standard output (see terminfo(4)). This string is usually used as the value for the environment variable. If is unable to determine the correct terminal type, it prompts the user for the correct terminal identification string. Options recognizes the following options: Causes to return an ID of "unknown" instead of prompting for the terminal type if auto-identification fails. If this option is not present, interactively prompts the user for the terminal type if it is unable to determine the correct type automati- cally. Causes to prompt for the terminal type before it sends the terminal identification request sequence. If the user responds with only a carriage return, proceeds with the automatic terminal identification process. Any other response is taken as the correct terminal type. Note that the and variables are not set if the user manually enters a terminal type. The option is normally used only for terminals that do not behave well when presented with terminal identification request sequence. It gives the user a chance to respond with the correct terminal type before any escape sequences are sent that could have an adverse effect on the terminal. The option can be used in conjunction with the option. The option only inhibits interactive prompting after has failed to identify the terminal by other means. Tells to print a series of shell commands to set the and environment variables to appropriate values. In addition, the variable is set to the two-character sequence representing the appropriate erase character for the terminal (DEL for ANSI termi- nals, backspace for all others). This two-character sequence can then be used as an argument to or (see stty(1) and tset(1)). The environment variable is consulted to see which shell syntax to use for setting the environment variables. This output is normally used with a command of the form: normally attempts identification of Wyse, ANSI and HP terminals. The type argument can be used to restrict the inquiry to that required for terminals of the specified type. The accepted types are and Multiple options can be specified. Enable verbose messages to standard error. Notes Use of the option is highly recommended because many terminals support variable-size displays. This option provides the only means for automatically configuring the user environment in such a manner that applications can handle these terminals correctly. Note that and are not set if the option is used and the user manually enters a terminal type. The following steps are performed in the order indicated when identifying a terminal: 1. tries the Wyse 30/50/60 id request sequence. 2. tries the standard ANSI ID request sequence. If a response is received, it is converted to a string according to an internal table. 3. tries the HP id request sequence. 4. If none of the above steps succeed, prompts interactively for the correct terminal type unless the option has been given. may skip one or more of the first three steps, depending on the presence of options. The HP ID request sequence can switch some ANSI terminals into an unexpected operating mode. Recovery from such a condition sometimes requires cycling power on the terminal. To avoid this problem, always sends the HP identification sequence last. EXAMPLES
is most commonly used as part of the login sequence. The following shell script fragment can be used during login shell initialization: # # If TERM is not set, see if our port is listed in /etc/ttytype. # If /etc/ttytype doesn't have information for our port, run # ttytype(1) to try to determine the type of terminal we have. # # To have ttytype(1) prompt for the terminal type before trying # to automatically identify the terminal, add the "-p" option # to the "ttytype -s" command below. # if [ -z "$TERM" -o "$TERM" = network ]; then unset TERM eval `tset -s -Q` if [ -z "$TERM" -o "$TERM" = unknown ]; then eval `ttytype -s` tset -Q -e ${ERASE:-^h} $TERM fi fi WARNINGS
The terminal identification sequences sent by can cause unexpected behavior on terminals other than the Wyse 30/50/60, standard ANSI or HP terminals. If you have such terminals in your configuration, use the or options to prevent from sending sequences that cause unexpected behavior. AUTHOR
was developed by HP. SEE ALSO
csh(1), ksh(1), sh(1), stty(1), ttytype(4), environ(5). ttytype(1)
All times are GMT -4. The time now is 01:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy