LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-17-2013, 12:27 PM   #1
sniper8752
Member
 
Registered: Oct 2012
Posts: 339

Rep: Reputation: Disabled
modifying MOTD


I have a raspberry pi, and I have a MOTD that appears, that I would like to modify. Where can I find that file to edit it?
 
Old 11-17-2013, 12:33 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
You should find the message in /etc/motd.
 
Old 11-17-2013, 12:47 PM   #3
sniper8752
Member
 
Registered: Oct 2012
Posts: 339

Original Poster
Rep: Reputation: Disabled
Ok - thanks!
One other question - I have code, like printf"...", Uptime... ${UPTIME}
I have at the beginning of the document, #!/bin/bash. I find that when I login, it just echos the text exactly. How do I get it to actually execute the code in the script?
 
Old 11-17-2013, 12:57 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
You don't. /etc/motd is not treated as a script, but as a textfile, you can't run commands in it.
 
Old 11-17-2013, 01:37 PM   #5
sniper8752
Member
 
Registered: Oct 2012
Posts: 339

Original Poster
Rep: Reputation: Disabled
Ok. I am trying to set up variables in my script. This is what I have:
set var(users) $env(USER)

When executed, I get the error:
/etc/motd.tcl: line9: syntax error near unexpected token '('
/etc/motd.tcl: line9: ` set var(user) $env(USER)'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] MOTD charanjaitu Linux - Newbie 8 02-22-2011 10:04 AM
/etc/motd skate Linux - Software 5 05-03-2006 09:44 AM
motd toothe Linux - Newbie 2 11-08-2005 05:02 PM
motd iomari Linux - Software 5 04-03-2005 05:43 AM
Is there any MOTD software available besides /etc/motd? csif Linux - Software 1 04-24-2004 07:36 AM


All times are GMT -5. The time now is 04:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration