Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing parameter from one session to another... (or something)

Status
Not open for further replies.

mckarl

Programmer
May 5, 1999
147
GB
ok, a quick one. when i open my telnet sessions from windows, i tend to open 3. now, i am wondering if there is a way to move characters from one session into the others, rather that repeating the command(s) three times.<br>
<br>
Session A, B, and C. <br>
<br>
i type a command in A, and B and C do the same thing. for example an all clear. if i want all the screens clearing. <br>
<br>
it would prove a useful idea i'm sure.<br>
<br>
thanks, <br>
<br>
------------------------------------------------------------ <p> <br><a href=mailto:mc_karl@yahoo.com>mc_karl@yahoo.com</a><br><a href=karls-stuff.co.uk>my stuff :)) WINProducts & stuff</a><br>- Karl<br>
<br>
- <b> the </b> damn good lookin' one ;)
 
Provided you're the same user, and you're using a shell with an history file, just enable the command history search. <br>
<br>
For example, with ksh it's 'set -o vi' and either ESC-k or ESC-j<br>
<br>
You can use the windows clipboard too.<br>
<br>
But I'm not really sure I understand what you want tot do.<br>
<br>
Patrice. <p>Patrice ALLAIS<br><a href=mailto:allais@lucent.com>allais@lucent.com</a><br><a href= > </a><br>
 
Just to add to Patrice's answer.<br>
<br>
With ksh there's a delay before the history from one window is available (Using Esc - ) in another. Type ^C in the other window to get it to re-read the history file.<br>
<br>
Mike<br>
<p>Mike Lacey<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
thanks, but it's not realy what i am after. i have made a mistake in telling you, that i am accessing this from an outer terminal (windows NT), and i have three sessions open to the UNIX box.<br>
<br>
i need a way to be able to pass parameters through one session (telnet session or whatever) to the other 2 at the same time, or send a command externaly from one window to another... <br>
<br>
(make any more sense of it?) <p> <br><a href=mailto:mc_karl@yahoo.com>mc_karl@yahoo.com</a><br><a href=karls-stuff.co.uk>my stuff :)) WINProducts & stuff</a><br>- Karl<br>
<br>
- <b> the </b> damn good lookin' one ;)
 
Karl,<br>
<br>
There are some good ways of passing data between processes (sessions) in unix.<br>
<br>
There are quite a few ways to be honest - tell us <b>exactly</b> what you'd like to do.<br>
<br>
Mike<br>
<p>Mike Lacey<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
ok, here we go::<br>
<br>
<br>
<br>
+-----------+ +===========+<br>
¦ ¦ Session 1 ¦ ¦ Session 2<br>
+-----------+ +===========+<br>
<br>
X=&quot;clear&quot; # as in clear screen right ?<br>
<br>
so, i type in the value of X into session 1, followed by a simple command, and hey presto, the same information is passed along to session 2 and executed.<br>
<br>
during this post, one of my work collegues found out, and sent the data to someone else's session, (a line of code) and he kept making the screen of the reciever go blank. <br>
And he is still refusing to tell me how he does it. <br>
I imagine it is something like <br>
echo &quot;clear&quot; =&gt; pts\1 <br>
or something to that effect.<br>
<br>
you know what i mean now?<br>
<br>
<p> Karl<br><a href=mailto:mc_karl@yahoo.com>mc_karl@yahoo.com</a><br><a href= > </a><br> ~ ~ ~ ~<br>
K A R L<br>
~ ~ ~ ~
 
Yeah - he's just sending terminal control codes to your tty (the pts thing).<br>
<br>
I think you could probably annoy him with the 'mesg no' command as I think that works by setting the attributes of your tty.<br>
<br>
Regards<br>
<br>
Mike<br>
<p>Mike Lacey<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href= Cargill's Corporate Web Site</a><br>
 
When you log in you get a puesdo tty.<br>
The puesdo tty your are on is always writeable by you.<br>
A who am i shows the tty you are on<br>
who am i<br>
userid pts/5 Jan 10 13:48 (10.10.10.10) <br>
<br>
In another session you could do ls &gt; /dev/pts/5<br>
or clear &gt; /dev/pts/5<br>
<br>
Tony
 
Thanks for that tony, i'm trying to do it, and i think it is something like that, but it doesnt seem to be working at present, i will have to keep on trying it ...<br>
<br>
<br>
Thanks ALL!!!<br>
<br>
<br>
<br>
<br>
<br>
<p> Karl<br><a href=mailto:mc_karl@yahoo.com>mc_karl@yahoo.com</a><br><a href= > </a><br> ~ ~ ~ ~<br>
K A R L<br>
~ ~ ~ ~
 
One other thing you could try have a shared area( file or memory) defined on login and start a background task on each login that will monitor this shared area, each terminal will need a predefined name, any you could send commands to this aera which would be picked up by the named terminal and executed.<br>
<br>
Hey I never said it would be easy.<br>
<br>
Maybe a shared directory with a fifo file for each terminal ???<br>
<br>
Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top