WRITE(1) General Commands Manual WRITE(1)NAME
write - write to another user
SYNOPSIS
write user [ ttyname ]
DESCRIPTION
Write copies lines from your terminal to that of another user. When first called, it sends the message
Message from yourname yourttyname...
The recipient of the message should write back at this point. Communication continues until an end of file is read from the terminal or an
interrupt is sent. At that point write writes `EOT' on the other terminal and exits.
If you want to write to a user who is logged in more than once, the ttyname argument may be used to indicate the appropriate terminal name.
Permission to write may be denied or granted by use of the mesg command. At the outset writing is allowed. Certain commands, in particu-
lar nroff and pr(1) disallow messages in order to prevent messy output.
If the character `!' is found at the beginning of a line, write calls the shell to execute the rest of the line as a command.
The following protocol is suggested for using write: when you first write to another user, wait for him to write back before starting to
send. Each party should end each message with a distinctive signal--(o) for `over' is conventional--that the other may reply. (oo) for
`over and out' is suggested when conversation is about to be terminated.
FILES
/etc/utmp to find user
/bin/sh to execute `!'
SEE ALSO mesg(1), who(1), mail(1)WRITE(1)
Check Out this Related Man Page
WRITE(1) Linux Programmer's Manual WRITE(1)NAME
write - send a message to another user
SYNOPSIS
write user [ttyname]
DESCRIPTION
Write allows you to communicate with other users, by copying lines from your terminal to theirs.
When you run the write command, the user you are writing to gets a message of the form:
Message from yourname@yourhost on yourtty at hh:mm ...
Any further lines you enter will be copied to the specified user's terminal. If the other user wants to reply, they must run write as
well.
When you are done, type an end-of-file or interrupt character. The other user will see the message EOF indicating that the conversation is
over.
You can prevent people (other than the super-user) from writing to you with the mesg(1) command. Some commands, for example nroff(1) and
pr(1), may disallow writing automatically, so that your output isn't overwritten.
If the user you want to write to is logged in on more than one terminal, you can specify which terminal to write to by specifying the ter-
minal name as the second operand to the write command. Alternatively, you can let write select one of the terminals - it will pick the one
with the shortest idle time. This is so that if the user is logged in at work and also dialed up from home, the message will go to the
right place.
The traditional protocol for writing to someone is that the string `-o', either at the end of a line or on a line by itself, means that
it's the other person's turn to talk. The string `oo' means that the person believes the conversation to be over.
SEE ALSO mesg(1), talk(1), who(1)HISTORY
A write command appeared in Version 6 AT&T UNIX.
12 March 1995 WRITE(1)
Hi folks,
Need your help.
I am writing a KSH script to read a few commands from a file & execute.
I am using the following code to read the file line by line & excute each command. When I am printing each line I see it is printing properly but while excuting, the particular "ps" command... (5 Replies)
I have one file in which some commands have written line line
i have to read lines from this file(file name passed as avariable)
and then i have to execute these commands..
how can i do it? (5 Replies)
hi
how to read terminal command,
just i want to read all command which write on terminal
so please tell me any system call, api avilable in c for above purpose (6 Replies)
I have a situation, where some script (running background) need to use the 'write' command and get a text to appeared on any screen of some particular user.
Like:>echo "$message"|write user1
But I surprisingly realized, that if a person logged under any other name and after that uses the 'su'... (11 Replies)
Hi All,
i have around 50 queries in sybase.
We have a requirement where we need to write a unix script, which execute the query one by one & generate the excel sheet & send it to user.
I have completed half of the part, where i am executing query one by one & putting the result into a .txt... (4 Replies)
Is there any way to write to a text file with scripting? I need to write to a text file two lines of text for the amount of files in the current directory. (9 Replies)
Hello all,
I would like a message to be displayed on the shell when someone opens up the terminal - something like a welcome msg with date and time. I know how to do this by running the shell commands but dont know how to display it when a user opens up the terminal?
Thanks in advance (27 Replies)
Hi,
I am a Unix Newbie :D.
I want to write a program such a way that:
Whenever number of filedescriptors opened by a process change, it should execute some commands (eg: write total number of FDs at that point of time to a file).
I dont want to poll '/proc/<pid>/fd' at regular intervals... (3 Replies)
Hi,
I have to switch to a different user and execute certain commands and then come back to the original user
Ex: My id is 'usstage'. I need to switch to 'apstage', souce a script there, execute a function and then get back again to usstage.
Please note that I do not have expect installed... (4 Replies)
Hi there,
As a regular unix user I am forever programming on the command line or writing scripts so that I first write a load of data to a file to read from. In the end I am always left with a bundle of .txt, .tmp which is what I usually call them. As a basic programmmer I was wondering is... (6 Replies)
Hi,
I am trying to remove leading and trailing spaces from a file using awk but somehow I have not been able to do it.
Here is the data that I want to trim.
07/12/2017 15:55:00 |entinfdev |AD ping Time ms | .474| 1.41| .581|green |flat... (9 Replies)
Recently I lost a number of changes I made to a program when the SCO Unix system went down. The system "mail" suggested a "vi -r" option that took me back several days. To prevent this in the future, I am trying to create my own vi command:
if
then
cp -p $1 $1.bak
fi
/usr/bin/vi $*
if ... (5 Replies)