<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Linux%2Fmotd</id>
	<title>Linux/motd - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Linux%2Fmotd"/>
	<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Linux/motd&amp;action=history"/>
	<updated>2026-05-07T04:25:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://aznot.com/index.php?title=Linux/motd&amp;diff=4819&amp;oldid=prev</id>
		<title>Kenneth: Created page with &quot;&lt;pre&gt;  __________________________________ &lt; My hostname is SOMESYS           &gt; &lt; My IP Address is 10.0.0.1        &gt;  ----------------------------------          \   ^__^...&quot;</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Linux/motd&amp;diff=4819&amp;oldid=prev"/>
		<updated>2018-07-17T20:43:03Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt;  __________________________________ &amp;lt; My hostname is SOMESYS           &amp;gt; &amp;lt; My IP Address is 10.0.0.1        &amp;gt;  ----------------------------------          \   ^__^...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 __________________________________&lt;br /&gt;
&amp;lt; My hostname is SOMESYS           &amp;gt;&lt;br /&gt;
&amp;lt; My IP Address is 10.0.0.1        &amp;gt;&lt;br /&gt;
 ----------------------------------&lt;br /&gt;
         \   ^__^&lt;br /&gt;
          \  (oo)\_______&lt;br /&gt;
             (__)\       )\/\&lt;br /&gt;
                 ||----w |&lt;br /&gt;
                 ||     ||&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/etc/profile.d/motd.sh&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
_hostname=$(hostname)&lt;br /&gt;
#_ip_address=$(ifconfig | grep -Eo &amp;#039;inet (addr:)?([0-9]*\.){3}[0-9]*&amp;#039; | grep -Eo &amp;#039;([0-9]*\.){3}[0-9]*&amp;#039; | grep -v &amp;#039;127.0.0.1&amp;#039;)&lt;br /&gt;
_ip_address=$( ip addr | grep &amp;#039;state UP&amp;#039; -A2 | tail -n1 | awk &amp;#039;{print $2}&amp;#039; | cut -f1  -d&amp;#039;/&amp;#039; )&lt;br /&gt;
&lt;br /&gt;
len_hostname=${#_hostname}&lt;br /&gt;
len_ip_address=${#_ip_address}&lt;br /&gt;
&lt;br /&gt;
pad=$(printf &amp;#039;%0.1s&amp;#039; &amp;quot; &amp;quot;{1..40})&lt;br /&gt;
padlength=35&lt;br /&gt;
&lt;br /&gt;
printf &amp;quot;\n\n\n\n\n&amp;quot;&lt;br /&gt;
printf &amp;#039;%s\n&amp;#039; &amp;quot; __________________________________&amp;quot;&lt;br /&gt;
printf &amp;#039;%s %*.*s&amp;gt;\n&amp;#039; &amp;quot;&amp;lt; My hostname is ${_hostname}&amp;quot; 0 $((padlength - ${#_hostname} - 18 )) &amp;quot;$pad&amp;quot;&lt;br /&gt;
printf &amp;#039;%s %*.*s&amp;gt;\n&amp;#039; &amp;quot;&amp;lt; My IP Address is ${_ip_address}&amp;quot; 0 $((padlength - ${#_ip_address} - 20 )) &amp;quot;$pad&amp;quot;&lt;br /&gt;
printf &amp;#039;%s\n\n\n\n&amp;#039; &amp;quot; ----------------------------------&lt;br /&gt;
         \   ^__^&lt;br /&gt;
          \  (oo)\_______&lt;br /&gt;
             (__)\       )\/\\&lt;br /&gt;
                 ||----w |&lt;br /&gt;
                 ||     ||&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
</feed>