Write Command - with script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Write Command - with script
# 1  
Old 04-05-2011
Write Command - with script

This is all on a Unix computer where I login using Putty (for references sake).

I was wondering if it was possible to use the write command with an already predetermined message in mind.

I'm attempting to write to another user, but I'd like to do something like:

write user1 "Message"

So basically after this program is executed, it will write to user1's terminal with the corresponding message.

Maybe there is someway to pipe a message through to the write command?

Thanks,
-Chad
# 2  
Old 04-05-2011
Like:

Code:
echo Message | write user1

(i.e. using a pipe, as you said)
This User Gave Thanks to Scott For This Post:
# 3  
Old 04-05-2011
Exactly, thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Write pid and command name to a txt file while executing a bash script

Hi All, Just have a requirement, I am executing a bash shell script, my requirement is to catch the pid and job name to a txt file in the same directory, is there anyway to do it? please help me out. Regards Rahul ---------- Post updated at 08:42 AM ---------- Previous update was at... (2 Replies)
Discussion started by: rahulkalra9
2 Replies

2. Programming

Write command

Hi to all the members at unix.com I have an issue in write command. Alhtough i know that basically the write command is used to write at the terminal. So suppose i use the write command then at the target terminal i get "Message from <id>@<servername> on <pts> <time>" and then the <msg> What... (1 Reply)
Discussion started by: abhijoneja
1 Replies

3. Shell Programming and Scripting

How to write an awk script that emulates the wc command

How to write an awk script that emulates the wc command Thank you very much!:) (3 Replies)
Discussion started by: vcnvcn
3 Replies

4. IP Networking

read/write,write/write lock with smbclient fails

Hi, We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies

5. Shell Programming and Scripting

How to write an at command which executes a script every month on 3 rd

Hi Any one pls give me the at command which runs 3 rd of every month at 2 am. Its urgent ...Your help would be so much for me Thanks .. (3 Replies)
Discussion started by: rxg
3 Replies

6. Shell Programming and Scripting

write a shell script to execute a command

Hello all, I have just started doing shell scripting. I want to read a file which stores the status of my job I have submitted on a cluster. The file looks something like this : ========================FILE============================= crab: Checking the status of all jobs: please wait... (4 Replies)
Discussion started by: learn_linux
4 Replies

7. Shell Programming and Scripting

Need to Write Shell Script based off of this shell command

I'm trying to read a bunch of log files and output the lines that contain particular strings. To accomplish this, I've been running the following from the command line: find . -name "*" | xargs grep " " | grep " " > output.txt Two grep statements are needed in case I'm looking for a... (3 Replies)
Discussion started by: Rally_Point
3 Replies

8. UNIX Desktop Questions & Answers

write a command that will do the ff:

write a command that will do the following: list all files in and below your home directory that contain letter 'a' in their filenames. (1 Reply)
Discussion started by: 2071fox
1 Replies

9. UNIX for Dummies Questions & Answers

Plz Help : How to use write command to execute command on some other terminal

Hi Group , I m trying to execute commands on some other system using write command but inspite of executing the commands they r passed as simple messages. - i m writing >write user-id ! ls o ctrl-d inspite of executing the command ls,other terminal shows ! ls. Thnx in advance. (2 Replies)
Discussion started by: Aashish
2 Replies

10. UNIX for Dummies Questions & Answers

help me write a find command

At times I have thse Oracle logfiles that grow like crazy and fill up a specific file system. I wanted to write a find command that lists which are the biggest files from the search path..so /qbidora02/oracledba/find . -name ....... <downward to the lowest level> and list file names, sizes and... (2 Replies)
Discussion started by: jigarlakhani
2 Replies
Login or Register to Ask a Question