General :: Dynamically Scripting Update Of MOTD?

May 5, 2011

I know this is somewhat lame, but I remember back in college the MOTD on some of the systems was a random quote. I always wanted to do that. It seemed really trivial, but still neat and clever.

I searched a bit and don't see anything built-in for CentOS, so I was considering writing a Perl script to parse the RSS feed from a quotes site, then update /etc/motd with a random quote from the feed. This would nearly guarantee I could have this on any distro with identical results. Does anyone know of anything that already exists? Is anyone interested in using a script that I write to have the MOTD updated with random quotes themselves, or am I the only one? I'm perfectly willing to share the result when I'm finished.

View 1 Replies


ADVERTISEMENT

General :: Scripting: Modifying SQL Fields Dynamically?

Feb 22, 2010

I'm looking for a way to dynamically modify a fied in the SQL file.

Example,

INSERT INTO `TABLE` VALUES(1AADFDF,DFF33D,10023,SOMEDATA, SOMEDATA);
INSERT INTO `TABLE` VALUES(1AADFDF,DFF33D,10098,SOMEDATA, SOMEDATA);

[code]....

The third field in this SQL file is what needs to change to n+1

"10023" needs to change to "1"
"10098" needs to change to "2"
"10123" needs to change to "3"
"10983" needs to change to "4"
etc...

I tried with awk and sed, but since both require the usage of ' (single quote), my variable fails to get updated. I know i can use cut and recreate the sql statememnt, but i believe there should be easier way using sed or awk. Would anyone know of any creative way to get this to work in one-liner? This needs to be a part of the script preferable without making call to external file.

View 1 Replies View Related

Ubuntu :: Update-motd Gone After Install?

Dec 13, 2010

I am not sure what happened here. I have 10.04.1 and was able to run a command "update-motd". I wasn't able to get it to dynamically create a new motd. My hope was to have it recreate it once a day and email me the MOTD from the server.

In trying to get it to do this, I did a "apt-get install update-motd" in which it proceeded to do this, but then after the installation, I get:

"update-motd: command not found".

What did I do, how can I manually update/create the /var/run/motd file?

View 2 Replies View Related

General :: Put A Script Into The Motd File?

Feb 13, 2010

how i can put an scipt into the motd file? For example if i want to know how many users are logged on while i log in.

View 1 Replies View Related

General :: Display Motd After Entering Username?

Feb 20, 2011

I want to display motd after entering username but before entering password. Is it possible?

View 8 Replies View Related

OpenSUSE Install :: Set $HOSTNAME To Dynamically Update With The Hostname That Is Specified For The Ip In DNS?

Apr 6, 2010

How do I set $HOSTNAME to dynamically update with the hostname that is specified for the ip in DNS?

View 3 Replies View Related

General :: Dynamically Change Display Of An Xterm Or Program?

Jul 27, 2010

If I do setenv DISPLAY other_machine:0 and launch a gui application I can send this application to my other_machine Is there any mean (utility or whatever) to send an OPEN application to another machine (by its pid eventually) So if I have an nedit open, and its pid is 13245, I could do something like send_to_display pid=13245 machine=other_machine:0

View 1 Replies View Related

General :: Difference Between Static And Dynamically Linked Library?

Aug 30, 2010

Libraries have always been ambiguous to me. I would love to have a clear understanding of them. Here's what I know so far... Ok I know that libraries are a bunch of functions and definitions in C that binaries use. I also understand that static libraries are used by the binaries in /sbin:/usr/sbin:/usr/local/sbin and dynamically linked libraries are used by the binaries in /bin:/usr/bin:/usr/local/bin So why have statically linked and dynamically linked libraries? I know that dynamically linked libraries are used to save space. Otherwise each binary would need its own private copy of a library. So dynamically libraries are used to save space.

1. Where are the static libraries and the dynamically linked libraries located in the file structure?

2. Where does ldconfig fit into all of this?

3. Would a rootkit affect both statically and dynamically linked libraries? I would think yes unless the libraries only have read permissions.

4. If the above is true, is there any reason for your libraries to have write permission other than when you want to edit them?

View 5 Replies View Related

General :: Dynamically Change Desktop Background From Bash Script?

Aug 28, 2011

Is it possible to change the GNOME desktop background during some period of time by just a random phrase from the list on black screen? Will is seriously load the CPU and consume battery life?

View 1 Replies View Related

General :: Dynamically Create/delete Device Nodes By Driver?

Apr 15, 2010

I'm a starter here in linux, I have written a driver code and in that, I register my character devices by passing 0 for the major number.

To set up I used to use mknod command from terminal to create node,

Is there any method to create node dynamically from driver code during initialization and delete them at cleanup time?

View 1 Replies View Related

General :: Shell Script To Delete Folders And Files Dynamically And Recursively?

Jun 7, 2010

I have an archive directory that needs to be cleaned up once per quarter. The top level (/data/archive/*) directory names change daily, as well as the subdirectories and the filenames (the application names everything according to date). Also, there are two top level directories, bin and incoming, that we can't touch. I want to write a shell script that loops through the 15 or 20 top level directories and deletes all files and subdirectories older than 3 days (skipping the bin and incoming folders). Can someone get me started on a script? I am kinda new to shell scripting.

View 2 Replies View Related

Fedora :: How To Get Motd To Display

Dec 7, 2010

ive done countless google searches and forum searches with all the same results all the time. Is there anyone who can tell me what file to edit in order to display? Ive tried editing the /etc/motd file and no luck. I tried alot of other stuff too.

View 10 Replies View Related

Ubuntu :: Get Rid Of The Motd When Ssh-ing Into The Machine

Mar 28, 2011

[On Ubuntu 10.10 64-bit]

I have been trying to get rid of the boring motd when ssh-ing into the machine. I have sudo vim-ed the /etc/motd file to no avail.

Even if I add a motd.tail tail file with my content. I still get the boring and verbose:

Quote:

Linux barney 2.6.35-28-generic #49-Ubuntu SMP Tue Mar 1 14:39:03 UTC 2011 x86_64 GNU/Linux
Ubuntu 10.10

Welcome to Ubuntu! * Documentation: [URL]

How do I get rid of this?

View 1 Replies View Related

Ubuntu :: MOTD Keeps Reverting To Default?

Jun 6, 2010

I am setting a customized MOTD, however after 24 hrs, it reverts back to the default MOTD.

I noticed that it is a softlink

Code:
cmmiller@ladytron:/etc$ ls -al | grep motd
lrwxrwxrwx 1 root root 13 2009-07-05 10:47 motd -> /var/run/motd
cmmiller@ladytron:/etc$

And I'm making the change to /var/run/motd, however it keeps changing.

View 2 Replies View Related

Ubuntu Servers :: Deletes Changes To MOTD?

Jul 29, 2010

I applied some changed to the MOTD in /etc/update-motd (including removing the canonical mention in ./python2.6/dist-packages/landscape/sysinfo/landscapelink.py). After updating the system I found that all my changes had been deleted without any warning. Is there a way around this nonsense?

View 2 Replies View Related

Server :: MOTD Will Not Change Ubuntu 10.10?

Apr 20, 2011

I am trying to change the motd "message of the day" on my Ubuntu server 10.10,
But when i do sudo vi /etc/motd...

i can change the text here, but as soon as I save and exit this file. It changes itself straight back.

View 3 Replies View Related

Programming :: Firefox Scripting Add-on (Scripting HTML / Javascript Inside Firefox)?

Sep 17, 2009

Is there a firefox add-on to script HTML and/or Javascript directly inside firefox

View 1 Replies View Related

Programming :: Script To Generate SSH Banner MOTD?

Apr 18, 2010

I want to automate my System-installation. So i try to make a Script that will generate the /etc/motd. Now i have the Problem that the script has some variables and after the "Hostname, OS, HW, IP" the "stars" are anyware, but not there they should. The most problem is the $OS this string can verry long or verry short be. Fedora release 12 (Constantine) or RedHat 5.4 i can do that after the variables place the "stars" on the write position?

Script
Code:
#!/bin/bash

[code]....

View 6 Replies View Related

Ubuntu Servers :: MOTD Root Disk Usage?

Dec 13, 2010

I've just installed ubuntu 10.04 and the message text that shows when you ssh in shows the disk usage of /home.How do I get it to show the disk usage of the entire root / instead? (like it used to on some older version of ubuntu)

View 1 Replies View Related

Ubuntu Servers :: Changing The Motd Style Notices When Connecting Via Ssh?

Dec 6, 2010

I'm running Ubuntu Server 10.10 and noticed that every time I log into the server via ssh it gives details that i don't necessarily want it to show.

Code:
Linux zeus 2.6.35-22-generic-pae #33-Ubuntu SMP Sun Sep 19 22:14:14 UTC 2010 i686 GNU/Linux
Ubuntu 10.10

[code]....

View 3 Replies View Related

Server :: Squirrelmail's Blank Screen After Editing Motd In Config.php?

May 31, 2010

When i tried to log in, i get blank screen on the login page, even the src/configtest.php This can be solved by reverting whatever was edited for the motd option to its original paramater. anyone experienced this before and found a solution? The only reason for me to use php 5.2 is to install roundcube alongside squirrelmail. Using: centos 5.5 32-bit, squirrelmail 1.4.8, php 5.2

View 1 Replies View Related

General :: Need Man Pages For Scripting

Apr 20, 2010

Does anyone know of any man pages that would provide me information on commands in shell scripting like while or case? I have a test tomorrow where we have to write shell scripts and we're allowed to use the man pages, but not allowed to look at previous scripts. I don't feel like memorizing a bunch of commands if I don't have to.

View 5 Replies View Related

General :: What Is Shell Scripting?

Feb 15, 2011

What is shell scripting? what is 'bash'?

View 14 Replies View Related

General :: Ubuntu 10.04 - GUI Scripting Languages

Aug 5, 2010

There is a scripting language made for Windows called AutoIt. It can do things like, for example, if a user highlights a word and presses a certain hotkey, it can copy that word into memory, open up firefox, go to google.com, paste the word into the text box, and click the button to search. What are some of the easiest scripting languages in Linux to learn that can do this?

View 4 Replies View Related

General :: What Is Purpose Of Bash Scripting?

May 15, 2010

What is the purpose of bash scripting? Is it just for file manipulation?

View 4 Replies View Related

General :: Do More Programs Need Scripting Support

Sep 6, 2010

I've been playing around with awesome wm, uzbl and doing quite a bit of reading and thinking. Do more programs need scripting support? I've found that being able to tell a program what I want it to do specificially has made life much easier. I'm finding some things (my prefered editors, ed and vim) are starting to seem a little limited since what they can do is fairly well defined and hard to change.

View 1 Replies View Related

General :: Any Projects On Shell Scripting?

Dec 6, 2010

Just give me any project on shell scripting .. to start working on it and practice my self ..

View 2 Replies View Related

General :: First Line In Shell Scripting?

Feb 15, 2011

I am a bit confused with the first line while writing a shell script , if someone can please explain me the meaning of the first line " #!/bin/bash "the confusion for me is the # at the beginning , in shell scripting # means a comment. but in this case it loads the shell which the script must use,instead of commenting the line how is this possible. where is this defined , any particular file.

View 3 Replies View Related

General :: How To Set Incrontab In Bash Scripting

Mar 7, 2011

I have a question;

Is it possible to set incrontab in bash script? I tried to set normal crontab and it works like a charm but unfortunately not "incrontab"

I have two bash files; test-incrontab.sh and addlinetocrontab.sh and here are the contents of these files respectively;

Code:

Code:

As you can see there are two enteries in each file. One for normal crontab and other one for incrontab. When i run "test-incrontab.sh" like following;

Code:

crontab works perfectly and i can see cron job set but for incrontab it just does not work. No error either!

I am only getting this back "table unchanged"

View 2 Replies View Related

General :: What Scripting / Language To Focus On?

Apr 26, 2010

So for example, I uses VBscript to script out my tasks in Windows, and more recently PowerShell.From a Linux Admin's point of view, what scripting would he/she need to know? Would being proficient in Bash be sufficient or should you supplement that with something else? (if so, what is that something?)

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved