WRITE(1) General Commands Manual WRITE(1)NAME
write - write to another user
write user [ ttyname ]
Write copies lines from your terminal to that of another user. When first called, it sends the message
Message from yourname@yoursystem on yourttyname at time...
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.
/var/run/utmp to find user
/bin/sh to execute `!'
SEE ALSO mesg(1), who(1), mail(1)7th Edition November 27, 1996 WRITE(1)
Check Out this Related Man Page
WRITE(1) Linux Programmer's Manual WRITE(1)NAME
write - send a message to another user
write user [ttyname]
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
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
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
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)
I want to write the output of From_Date_Parm and To_Date_Parm to the target file. I want to write a script by passing the filename.
In my case the file is TransactionParams
I tried it through command line.
sed... (2 Replies)
Hi I would like to write a script which accepts the user name from the command line and it should find the user id of that particular user name.
Could any one of you pls give me the command which will be useful.
Thanks in Advance
Raju (3 Replies)
1. Can anyone explain me what the line
2. How do I write a command to print the longest line in a file?
3. How do I write a command to print the last word of every line of a file using sed?
4. What exactly does this line do?
:%s/^\(\)\(\)/\2\1/g^M... (3 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, I want to write a script that runs a command (at -l) and writes the output to a file. If the command (at -l) command returns no value (is empty/null) then write a message to the file in place of the command output.
My problem is around trapping the empty returned command value and replacing... (2 Replies)
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)
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)
can you please help me to get clarified about the 'write' command.
I have a script that sends a content of a file msg.txt to other user 'User B' using 'write' command.
cat msg.txt | write "user B"
Issue: I face a issue here, this scripts sends... (3 Replies)
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)
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:
cp -p $1 $1.bak
if ... (5 Replies)