05-26-2009
How to display message when starting a terminal
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
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I want to display a system warning message at the prompt of every live terminal on a sun solaris 8 machine using CDE.
I know this can be done on a console, but what about dtterm and xterm regular windows?
Does anyone know how this is done?
What about a single terminal?
Clear skies,... (2 Replies)
Discussion started by: seismic_willy
2 Replies
2. Shell Programming and Scripting
hi all
i have script
#!/bin/bash
cd /usr3/prod
grep ERROR /usr3/prod/ind.log > /usr3/prod/ind_err.log
if test -s /usr3/prod/ind_err.log
then
echo "error during process"
else
echo "process succeed"
fi
i want that this message(echo) will be display one time at the top of the screen... (5 Replies)
Discussion started by: naamas03
5 Replies
3. Shell Programming and Scripting
hi all,
am trying to 'grep' some text from a log file and use the 'cut' command to read from that line i just grep'ed to extract date/time and response times.
code sniplet i am using is :
grep -i 'text to grep' Out.log |
while read LINE;
do
... (11 Replies)
Discussion started by: cesarNZ
11 Replies
4. Shell Programming and Scripting
Hi All,
Need urgent help!!!
Can anyone tellme how can we send a message on specific user terminal and get a response from user in return.
Thanks in advance. (3 Replies)
Discussion started by: Sadhana
3 Replies
5. UNIX for Dummies Questions & Answers
How can the shortcut keys be defined that would open up a terminal window? When using a kvm switch, the mouse sometimes does not work, but the keyboard does, and by opening up a terminal window using a shortcut key combination, the mouse can be restarted by entering the predefined mouserestart... (0 Replies)
Discussion started by: figaro
0 Replies
6. OS X (Apple)
I was wondering if anyone can tell me how to log back in to unix after logging out. I have a MBPro. If I don't have the window close after exiting, then there is the phrase 'process completed' in brackets with a blinking cursor, but I can't type anything in.
Is it also possible to start the... (4 Replies)
Discussion started by: Straitsfan
4 Replies
7. Shell Programming and Scripting
Hi,
I am trying to open small size file only in vi editor on solaris or Linux machine
but it giving message "Terminal too wide" and then I have to come out.
As shown below:-
-rwxr-x--- 1 rkycadm rkycprd 2445 Sep 12 04:06
$ vi file.txt
Terminal too wide
:q!
----------... (2 Replies)
Discussion started by: RahulJoshi
2 Replies
8. Windows & DOS: Issues & Discussions
when I run C:\cygwin\bin\run C:\cygwin\bin\startxwin.exe it fires up a terminal by default. Can I eliminate that terminal and start the x server as a service silently and sits in my status bar just there? Thanks Jack (0 Replies)
Discussion started by: lucky7456969
0 Replies
9. Ubuntu
I am unfamiliar with below error and how to fix it, it happens when I start the terminal in Ubuntu 14.04.3. I do not send any command only press crtl+alt+T. It seems to indicate that something is missing from PATH but I’m not really sure what. Thank you :).
Command 'lesspipe' is... (24 Replies)
Discussion started by: cmccabe
24 Replies
10. UNIX for Beginners Questions & Answers
Is there any way to print the colorful message in the terminal (which is the output of a simulation) to the log file with the same color.
The colorful message at the terminal is obtained by the following codes:
/////////////codes start here///////////////////////////////////////
... (5 Replies)
Discussion started by: babunp114525
5 Replies
write(1) General Commands Manual write(1)
NAME
write - interactively write (talk) to another user
SYNOPSIS
DESCRIPTION
The command copies lines from your terminal to that of another user. When first called, it sends the message:
to the receiving user's terminal. When it has successfully completed the connection, it also sends two bells to your own terminal to indi-
cate that what you are typing is being sent.
To set up two-way communication, the recipient of the message (user) must execute the command:
(yourterminal is only required if the originator is logged in more than once.)
Communication continues until an end of file is read from the terminal, an interrupt is sent, or the recipient executes At that point,
writes on the other terminal and exits.
To write to a user who is logged in more than once, use the terminal argument to indicate which line or terminal to send to (e.g., Other-
wise, the first writable instance of the user found in database is assumed and the following message is displayed:
terminal
...
Permission to write may be denied or granted with the command (see mesg(1)). Writing to others is normally allowed by default. Certain
commands, in particular and disallow messages in order to prevent interference with their output. However, if the user has the appropriate
privileges, messages can be forced onto a write-inhibited terminal.
If the character is found at the beginning of a line, calls the POSIX shell (see sh-posix(1)) to execute the rest of the line as a command.
The following protocol is suggested for using When you first to another user, wait for the user to back before starting to send. Each per-
son should end a message with a distinctive signal (such as "" for "over") so that the other person knows when to reply. Similarly, the
signal "" (for "over and out") can be used to indicate the end of the conversation.
EXTERNAL INFLUENCES
Environment Variables
determines the locale to use for the locale categories when both and the corresponding environment variable (beginning with do not specify
a locale. If is not set or is set to the empty string, a default of "C" (see lang(5)) is used.
determines the format and contents of date and time strings.
determines the language in which messages are displayed.
If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See
environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported.
DIAGNOSTICS
The user you are trying to write to is not logged on.
Your correspondent has denied write permission
after your session started. Your session is ended.
Your correspondent sent end-of-file,
or you set your terminal to and your correspondent tried to write to you. If you have a session established, you can continue to
write to your correspondent.
The user you are trying to write to has denied write permission (with
Your terminal is set to
and the recipient cannot respond to you.
EXAMPLES
By issuing the command:
user sends a message to user screen. If responds:
two-way communication between and is established.
FILES
To find user
To execute shell commands
SEE ALSO
elm(1), mail(1), mailx(1), mesg(1), nroff(1), pr(1), sh-posix(1), sh(1), who(1), utmpd(1M), getutsent(3C).
STANDARDS CONFORMANCE
write(1)