how to print date/cal in /etc/motd on linux server

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat how to print date/cal in /etc/motd on linux server
# 1  
Old 01-18-2010
Bug how to print date/cal in /etc/motd on linux server

helo

i want to show today date and calendar when v succesfuly login on the system on the linux server

please orovide the sol for the same

thanx SmilieSmilieSmilie
# 2  
Old 01-18-2010
Hello dodasajan,

basically the content of /etc/motd is just displayed using something along the line:
Code:
[ -f /etc/motd ] && cat /etc/motd

IOW, it will be difficult to implement your functionality using /etc/motd... However /etc/profile might be what you are looking for.

HTH,
Loïc
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Date: invalid date trying to set Linux date in specific format

i try to set linux date & time in specific format but it keep giving me error Example : date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" or date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" keep giving me this error : date: invalid date ‘19-01-2017 00:05:01' Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies

2. UNIX for Dummies Questions & Answers

Print start date to end date, given $1 & $2 in ksh

Dear all, I have an user passing 2 parameter 31/03/2015 and 02/04/2015 to a ksh script. How to print the start date to end date. Expected output is : 31/03/2015 01/04/2015 02/04/2015 Note : 1. Im using aix and ksh 2. I have tried to convert the given input into a date, didnt... (0 Replies)
Discussion started by: mr.rajaravi
0 Replies

3. Solaris

Setting up Solaris 10 to print to a windows print server

Guys, I have a issue that I am trying to rectify please advise. lpstat -t shows scheduler is running printer lext644 disabled since Mon Dec 02 19:48:18 2013. available.I have restarted the printer service and it shows online but the above says disabled. I have a lot of jobs in the print... (1 Reply)
Discussion started by: terrywhitejr
1 Replies

4. Red Hat

Print server Migration from AIX to Linux

Hi, Can anyone help me on migration the print server from AIX to RHEL 4? Appreciate your help? (1 Reply)
Discussion started by: brby07
1 Replies

5. Shell Programming and Scripting

Getting a specific date from cal output with AWK

Hi guys! I'll make this short... Is there any good way to get the day number that first matches the Monday column from the cal command output with awk (or any other text manipulator commands) ? I'm sorry if my question wasn't clear at all. For example... One cal output would be $... (6 Replies)
Discussion started by: Casey
6 Replies

6. UNIX for Advanced & Expert Users

Get date from cal function

Cal Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 cal | awk '{print $7}' Sat 13 20 27 In the above output i am missing 6 because the first column is empty so it is shfting. How... (3 Replies)
Discussion started by: ukatru
3 Replies

7. UNIX for Dummies Questions & Answers

/etc/motd

Hi I do get the message of the day upon logging in to my machine(Solaris 9). I do NOT have a .hushlogin file in my home directory. Any ideas :-) (7 Replies)
Discussion started by: run_time_error
7 Replies

8. Shell Programming and Scripting

replacing old motd with new motd

I need to replace the current /etc/motd text file with a new motd across 30+ servers. Which is the best way to do this? Shell script? sed? Does anyone have an example I can use? Thanks in advance. Unix people are the best!!! :) (2 Replies)
Discussion started by: antalexi
2 Replies

9. UNIX for Dummies Questions & Answers

Linux help on X and motd

Hie guys im new to Unix. Need some advise or favour perhaps. Iam running Red hat Linux 7.2 and as soon as i install with GUI and so done, i reboot the system. After i reboot it directly went to the GUI login. I able to login and do my stuffs. My question is how to hold the system not to directly... (4 Replies)
Discussion started by: ###1tomato
4 Replies
Login or Register to Ask a Question