clarification Required in Write command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting clarification Required in Write command
# 1  
Old 01-25-2010
MySQL clarification Required in Write command

Hi All,
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.

Script:
------
.....
cat msg.txt | write "user B"
.....


Issue: I face a issue here, this scripts sends message to user B successfully. But the message is interuppting user B even if he is busy doing other jobs or even if he is 'vi' some files.
so the message is not clear to the user.

please clarify me on the below things:
1. Can I send the message as a pop up
2. Can I send a colored text to differentiate the message content.
3. Can I let the terminal of User-B to blink upon sending the message.
4. Can I clear the message content from his terminal if he hits Ctrl+c.
5. Please assist me to know whether I can achieve sending a pop up message to other terminals using any other commands.

Thanks in advance for all of your support and assistance.!! Smilie
# 2  
Old 01-26-2010
Assuming that the user is using a PC running a windows terminal emululation program.
You have to write a Visual Basic program that accepts input from the command line, and displays the message in a popup window.
Re work the write command so that it invokes the program.
Some emulators will allow this in their escape sequences Anita from http://april.se, and here http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/osc.html
# 3  
Old 01-26-2010
Quote:
Originally Posted by little_wonder
1. Can I send the message as a pop up
2. Can I send a colored text to differentiate the message content.
3. Can I let the terminal of User-B to blink upon sending the message.
4. Can I clear the message content from his terminal if he hits Ctrl+c.
5. Please assist me to know whether I can achieve sending a pop up message to other terminals using any other commands.
  1. What's a pop-up for you? write, as specified by the OpenGroup, doesn't know anything about "Windows", only terminals.
  2. Yes, you can. However, you'd have to send the command codes for the appropriate remote terminal as part of the message, and even then it's not guaranteed to work. See ANSI escape codes for details
  3. See 2. Just a matter of the sequences sent
  4. Again, see 2.
  5. Again, what's a pop-up for you? If the other user has an open X11 display, and you're allowed to connect to it, you could use xmessage.
# 4  
Old 02-01-2010
MySQL

Thank you so much for both of your responses.
Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Clarification on Case command

Hi, I'm a newbie to shell programming and have just written a small program to transfer files. # job variables RunMode=$1 export DATETIME=`date +%Y%m%d%H%M%S` export STARTTIME=`date +%Y%m%d%H%M` export ShellDir=/rosetlt/scripts/ksh export LogDir=/rosetlt/scripts/log export... (2 Replies)
Discussion started by: narayanv
2 Replies

2. Shell Programming and Scripting

Net rpc command clarification

Hi, I am checking below command to see the status of windows service from unix but due to "!" sign it is not accepting password. Please suggest alternative what should i do resolve the issue. net rpc service status W32Time -I 10.1.1.1 -U "mydomain\admin%Passwod12!" One more thing... (1 Reply)
Discussion started by: learnbash
1 Replies

3. HP-UX

su command clarification

Hi, I want to use the "SU" command in script it is asking me to enter the password manually. pleas the say the syntax of su command in single line that includes username/password. :) (3 Replies)
Discussion started by: vigneshwaran007
3 Replies

4. UNIX for Dummies Questions & Answers

Clarification required on sed

Hi Can some one tell what does this sed command do sed 's/*$//g I am more curious on the highlighted part , can some one explain what does that mean. Thanks Sri (1 Reply)
Discussion started by: Sri3001
1 Replies

5. Shell Programming and Scripting

Help required to write shell script to change passwd

Hi All, I wanted to write a shell script which will change the expired passwd in oracle. Here is below what I am trying, #!/bin/sh set -x ORACLE_HOME="/optware/oracle/9.2.0.2_64" SQLPLUS="${ORACLE_HOME}/bin/sqlplus" PASS="xyz" PATH=$ORACLE_HOME/bin:$PATH... (0 Replies)
Discussion started by: gr8_usk
0 Replies

6. UNIX for Dummies Questions & Answers

Clarification on '1 days ago' in date command [Found answer, posted within]

I know the topic of getting yesterday's date has been covered ad nauseum, but I just want to be clear on something. I recently started using the command date --date='1 days ago' '+%m/%d/%y' to get yesterday's date and it's been working great. I just want to be certain that it is going to... (1 Reply)
Discussion started by: DeCoTwc
1 Replies

7. Cybersecurity

Help Required: Command to find IP address and command executed of a user

Hi, I am trying to write a script which would figure out who has run which command and their IP. As i dont have any clue as to which commands would do this job, i request some gurus to help me on this. Thanks Vishwas (2 Replies)
Discussion started by: loggedout
2 Replies

8. Shell Programming and Scripting

need clarification about tr -d command ?

Hi , I need your help to know the exact operation of this following code .. cat file1 | ux2dos | tr -d ''>>file2 file1 contains only one line : "DTS-PO\SPECTRUM WO 56" the data contains a META CHAR "\" .. look at the above line. But , The file2 output contains :... (7 Replies)
Discussion started by: vparunkumar
7 Replies

9. Solaris

Sun Unix command clarification

I am reading a Sunsolve document covering moving /var and am confused by one step. What does this command do (in English): Move into the existing /var directory and transfer all the data to /newvar # cd /var # tar cvf - . | (cd /newvar; tar xfBp -) (4 Replies)
Discussion started by: FredSmith
4 Replies

10. Shell Programming and Scripting

nawk command clarification

Hi, I am using the following command. nawk '$1==p{$2=sprintf("%09d",$2+1)};1' p=$JOB_NUM q=$LEN $VALUE_TABLE > ./TEMP_TABLE As you can see the code above, I basically read a value from the table VALUE_TABLE and select a particular row based on searching the value JOB_NUM. Now Actually the... (2 Replies)
Discussion started by: Tux_Raju
2 Replies
Login or Register to Ask a Question