Hi guys;
I want to show what am I doing on a terminal into another. I did something close but its not working really good.
Example: cat /dev/pts/12 >/dev/pts/13
where 12 is my terminal and 13 its the other terminal.
This is usefull for me to share my small unix knowledge to other people... (4 Replies)
Hello!
I'm having problems trying to extract the contents of a variable and placing it into a text file. Grateful for any help.
Been trying something along the lines of:
$variable > file.txt
or
`cat < $variable` > file.txt
As you can see I'm a newbie to this :D (2 Replies)
Hi. I'm a newbie in scripting and i have this problem: i want to use the 'fuser' command on a file to tell if it's being accessed (for my purposes: still being written). I want to save the output of the command and later compare with the 'not being used' result.
the script:
#!/bin/bash... (2 Replies)
The situation is like this:
I am reading records from a file, depending upon some condition extracting fields from the file into different variables in a loop one by one. I need to print all the variable in line, so I am trying to redirect hose variables one by one to a variable called final_value... (1 Reply)
i wanted to execute some terminal commands on local linux, parse their output and display it to the user, i checked netcat source code but i couldnt understance it since im new to c (and linux at the same time).
so i was wondering if there is away to run an instance of terminal hidden, read and... (15 Replies)
Hi everybody,
I am trying to do the thing you see in the title, and I can't simply do
a=$(svn up)
echo $a
because the program (svn) gives output on lots of lines and in the variable the output is stored on only one line (resulting in a horribly formatted text). Any tips?
Thanks,... (2 Replies)
Hi,
I want to save the whole Output of the terminal in a file. I dont want to redirect a single command to a file (ls -l > test.txt), I want to redirect the whole last 40 lines into a file.
Maybe i can read out the terminal while working with it, but i cant find a way to save the whole... (2 Replies)
Hello everybody,
I'm testing some aspects of X Terminal implementation and it's going great. I can use remote applications on my local slow workstation at remote's processor speed by redirecting the remote DISPLAY variable to "my_local_ip:0.0"; but i'm having troubles to get remote audio and... (2 Replies)
When ever i started my terminal,Every time I have to change the directory like "cd user/documents/ravi/folder2/folder3" Without typing this entire command every time ,I placed "alias c='cd user/documents/ravi/folder2/folder3'" in .bash_profile file. so that i can able to execute command 'c'... (6 Replies)
I have a password reset expect script which stores all the op to an file. I need to check the whether password is successfully changed by greping out the file and storing the o/p to a variable.
But we try to print the variable , its shows only the command instead of its o/p.
... (2 Replies)
Discussion started by: sudharson
2 Replies
LEARN ABOUT LINUX
ptmx
PTS(4) Linux Programmer's Manual PTS(4)NAME
ptmx, pts - pseudo-terminal master and slave
DESCRIPTION
The file /dev/ptmx is a character file with major number 5 and minor number 2, usually of mode 0666 and owner.group of root.root. It is
used to create a pseudo-terminal master and slave pair.
When a process opens /dev/ptmx, it gets a file descriptor for a pseudo-terminal master (PTM), and a pseudo-terminal slave (PTS) device is
created in the /dev/pts directory. Each file descriptor obtained by opening /dev/ptmx is an independent PTM with its own associated PTS,
whose path can be found by passing the descriptor to ptsname(3).
Before opening the pseudo-terminal slave, you must pass the master's file descriptor to grantpt(3) and unlockpt(3).
Once both the pseudo-terminal master and slave are open, the slave provides processes with an interface that is identical to that of a real
terminal.
Data written to the slave is presented on the master descriptor as input. Data written to the master is presented to the slave as input.
In practice, pseudo-terminals are used for implementing terminal emulators such as xterm(1), in which data read from the pseudo-terminal
master is interpreted by the application in the same way a real terminal would interpret the data, and for implementing remote-login pro-
grams such as sshd(8), in which data read from the pseudo-terminal master is sent across the network to a client program that is connected
to a terminal or terminal emulator.
Pseudo-terminals can also be used to send input to programs that normally refuse to read input from pipes (such as su(1), and passwd(1)).
FILES
/dev/ptmx, /dev/pts/*
NOTES
The Linux support for the above (known as Unix98 pty naming) is done using the devpts file system, that should be mounted on /dev/pts.
Before this Unix98 scheme, master ptys were called /dev/ptyp0, ... and slave ptys /dev/ttyp0, ... and one needed lots of preallocated
device nodes.
SEE ALSO getpt(3), grantpt(3), ptsname(3), unlockpt(3), pty(7)COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2002-10-09 PTS(4)