Sponsored Content
Top Forums Programming Create a Term & Run chars on this Term Post 39255 by the_tical on Tuesday 12th of August 2003 05:48:22 AM
Old 08-12-2003
Question Create a Term & Run chars on this Term

hi floks !
i'd like to know how can i transmete a character or a string from my source code to a term and make it interpret or un by the shell wich is running in my term.
I'd like to create a Term from my code (and get its file descriptor) and then transmete each char typed on the keyboard to this Term.
The easier way to do it seemed to be redirection :
ex: echo "ls -al" > /dev/pts/mytty
but the command is not runned on the console
then i tried to write directly on the file :
ex: fp=fopen("/dev/pts/mytty","w"); fputs("ls -al\n",fp);
but the command is only written on the output of the term but not runned on the shell.

if someone has an idea, it'll be great Smilie cause i'm getting mad Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Setting TERM variable

Does anybody know how to give a default TERM variable while telnetting to Solaris (1 Reply)
Discussion started by: DPAI
1 Replies

2. UNIX for Dummies Questions & Answers

X-Term for Windows

Hi Everyone, I need some information from all of you guys. I generally work on a Solaris OS in my school and I had heard that I can download something called X-Term on a Windows system and still work on some of the graphical things on windows which generally work only on unix. This is what I... (5 Replies)
Discussion started by: yelamarthi
5 Replies

3. UNIX for Dummies Questions & Answers

diff between $TERM & $DISPLAY

Can anybody pls explain me the diff between $TERM & $DISPLAY ? Thanks in advance. (1 Reply)
Discussion started by: Venky
1 Replies

4. Shell Programming and Scripting

Help with TERM script

I am trying to amend an existing TERM script to prompt the end user for a password - then take that password and add it to a specific part of an existing file. Here is what I have - BUT - I am confusing Unix with Term and my script does not like what I added b/c the script simply runs through... (1 Reply)
Discussion started by: Surdeymon
1 Replies

5. Shell Programming and Scripting

Search term and output term in desired field

Hi All, I have an input_file below and i would like to use Perl to search for the term "aaa" and output the 3rd term in the same row as "aaa".For Example, i want to search for the term "ddd" and would want the code to ouput the 3rd term in the same row which is "fff". Can somebody help ? ... (28 Replies)
Discussion started by: Raynon
28 Replies

6. Shell Programming and Scripting

Testing for TERM type

There are times where I want to use putty(vt100 TERM) and hummingbird (XTERM) is there a way to test what terminal connection I am using in my .profile so I can set my commands like stty erase correctly. (4 Replies)
Discussion started by: BeefStu
4 Replies

7. Shell Programming and Scripting

killproc -term

Hi, I am trying the function killproc -term and it seems to be doing something extra that kill <pid> doesn't do. My daemon cleanly terminates using kill, but not using killproc. I tried strace on killproc and then killproc works well. I read online that strace ignores SIGSTOP. does that mean... (4 Replies)
Discussion started by: fosfat
4 Replies

8. UNIX for Dummies Questions & Answers

Awk For a Specific Term

I'm having trouble pulling specific ROWS out of a very large file. I've been using an awk command in unix that looks like this: awk '{if ($16=="ACCEPTOR" || $16=="DONOR") print $0}' file1 > file2 However, it is not selecting all of the rows which include either acceptor or donor in them. I... (7 Replies)
Discussion started by: infiniteabyss
7 Replies

9. UNIX for Dummies Questions & Answers

qvt term with windows xp

I.m using qvt term to convert my windows xp laptop to work with sun ultra 5 unix system but i can't connect - my settings are off and i can't figure it out - i have a feeling it is my serial port # the porgramm is asking for. Can someone tell me where i can find this number. thanks Christine (9 Replies)
Discussion started by: lucenta tire
9 Replies

10. UNIX for Beginners Questions & Answers

Error term undefined

i keep getting this error when i ssh using my id - any idea (2 Replies)
Discussion started by: tariq_m
2 Replies
Term::Filter::Callback(3pm)				User Contributed Perl Documentation			       Term::Filter::Callback(3pm)

NAME
Term::Filter::Callback - Simple callback-based wrapper for Term::Filter VERSION
version 0.03 SYNOPSIS
use Term::Filter::Callback; my $term = Term::Filter::Callback->new( callbacks => { munge_input => sub { my $self = shift; my ($got) = @_; $got =~ s/ce/E- Elbereth /g; $got; }, munge_output => sub { my $self = shift; my ($got) = @_; $got =~ s/(Elbereth)/e[35m$1e[m/g; $got; }, }, ); $term->run('nethack'); DESCRIPTION
This module provides a callback-based API to Term::Filter. The desired callbacks can just be passed into the constructor of this class, rather than requiring a new class to be manually defined. This class consumes the Term::Filter role, so the rest of the documentation in that module applies here. ATTRIBUTES
callbacks A hashref of callbacks for Term::Filter. The keys are callback names and the values are coderefs to call for those callbacks. AUTHOR
Jesse Luehrs <doy at tozt dot net> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Jesse Luehrs. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-03-08 Term::Filter::Callback(3pm)
All times are GMT -4. The time now is 09:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy