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


ADVERTISEMENT

Programming :: How To Generate MD5 / Sha-1 With Perl

Mar 31, 2010

How can I generate a md5 or sha-1 code with perl?

View 2 Replies View Related

Debian Programming :: Generate SQL Result Into XML

Dec 2, 2014

How do I generate sql result into xml ? Tried this way (shown below), but it generates all data into single column.

Code: Select allgenerate_xml()
{
        f1=_tmp1
        f2=_tmp2
        cat $SQL_QUERY_OUT |sed -e 's/^"//g;s/"$//g;s/","/|/g'|tr '|' ' ' > $f1
        [ -e $SQL_QUERY_OUT ] && rm $SQL_QUERY_OUT

[code]....

View 2 Replies View Related

Programming :: Generate Excel Charts From C?

Feb 24, 2011

Does anybody know how to generate excel charts from C, or if it's possible at all?

For example, if I had 2 arrays that I wanted to export to excel and graph against each other. I know how to export it to a csv file, that's no problem, but I have no idea where to start with generating a graph of the data. I can't seem to find any examples anywhere.

I'd appreciate if someone could point me in the right direction.

Just a simple example to show you what I mean code...

View 10 Replies View Related

Programming :: Script To Generate Vouchers?

Jun 24, 2010

I have a file, two columns, first column has a list of 15000 (yes 15k) unique codes, second column has the afilliate codes of 60 locations repeated to fill out the 15000 rows of unique codes. I need to produce a nice neat paper voucher which will fit onto A6 (1/4 A4) and is ready to print. Each voucher has the unique code and corresponding location. So far I am thinking PHP will do the job. This does it somewhat, but doesn't let be split the fields between the ",". I did this so far in PHP

[Code]...

View 3 Replies View Related

Programming :: Generate Pdf In Thai Language?

May 19, 2009

I am trying to generate pdf in thai language. i have installed thai package (extension in babel package). It is finally generating pdf in thai. but thai string are cming very long as compared to original string given in .tex file.

View 3 Replies View Related

Programming :: Using /dev/random To Generate Double?

Mar 6, 2010

I need to generate random numbers using /dev/random in C. The numbers should be of type double (64-bit floating point).The functionality should be equal to linux command "od -An -N8 -t fD /dev/random", but written in C.The prototype should be "double drand(void);".

View 7 Replies View Related

Programming :: Script To Generate Random Dates?

Aug 3, 2010

A script to generate random dates. It uses the year range 2006-2009, and truncates every month of the year to an ordinary February's 28 days, but otherwise it's pretty solid and safe.

Code:
spate=1
while [ $spate -le 120 ]

[code]....

View 1 Replies View Related

Programming :: Running Some Script To Generate Below Values?

Mar 24, 2011

We are running some script to generate below values however we don't need the first level output as it always shows cpu % as 0.0.

(We dont need following part:
NAME STATE CPU(sec) CPU(%)
XXX -----r 55567 0.0

[code]....

View 10 Replies View Related

Programming :: Tool To Generate Class Diagrams?

Sep 7, 2010

I have some c++ code and want to generate class diagrams using some tool which would scan the c++ code and generate diagrams. Is there any such open source tool to be used on linux machine?

View 1 Replies View Related

Debian Programming :: GCC Can't Generate 64 Bit Program On Wheezy Mips64?

Dec 21, 2014

I have both 32 bit and 64 bit libs installed with gcc multilib.

I tried following options, but the result is still a 32bit elf:

# cc -mips64 -mabi=o64 -mlong64 -mgp64 -c gendian.c
# file gendian.o
gendian.o: ELF 32-bit LSB relocatable, MIPS, MIPS64 version 1 (SYSV), with unknown capability 0xf41 = 0x756e6700, with unknown capability 0x70100 = 0x1040000, not stripped

The machine is running 64 bit os:

# uname -a
Linux debian 3.2.0-4-5kc-malta #1 Debian 3.2.63-2+deb7u2 mips64 GNU/Linux

Both 4.6 and 4.7 gcc have been tried, and both have the same issue.

Fixed: need -mabi=64

View 0 Replies View Related

Programming :: Write A Program In C Which Will Generate A Maze Randomly ?

Oct 8, 2010

I want to write a program in C which will generate a maze randomly and find the solution for it ..

The idea behind is in [url]

How the 16 bit integer is stored in a variable..Earlier I wrote a program on trees and displayed it using dotty.. Is there any such tool to display a maze..I am using ubuntu 10.04.

View 1 Replies View Related

Programming :: Generate Alphanumeric Characterlist - No Repeating More Then 3 Times?

Apr 5, 2011

i have spotted that script (something similar that i am looking for)

[URL]

and i just dont know how to use it.I am not a programmer myself and probably no need for learning that just to create one script! modify "wje_lq" script and run it. thing like : "Just redirect standard output to a file in the normal manner" ? and all this

I.Comment out the first definition of *character-set*, by adding a semicon at the beginning of the line.

II.Uncomment the second definition, which just uses "ABC", by removing the semicolon from the beginning of the line.

III.Comment out the first definition of *word-length*.

IV.Uncomment the second definition, which uses a word length of four.

i would like to generate :

10-character combinations of the following characters (lowercase) 23456789abcdef with no more then 3 same letters repeates no metter side by side or within one line (sequence) so lets say

abcdef1234 accept
fabcde1234 accept
ffabcd1234 accept

which is probably permutation with repetable string ( where abc is not equeal to cba etc .so ti speak position does metter)

fffabc1234 not acceptable -----(3 same characters)
ffabcf1234 not acceptable -----( 3 same characters event thought not side by side)

we dont want 3 same characters apper in same line.

View 2 Replies View Related

Programming :: Reading Lines To An Array And Generate Dynamic Zenity List?

May 18, 2011

explanation what I want to do exactly:I have a textfile which looks for instance like this:

file.txt:
...
something=else to do

[code]....

View 14 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

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

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 :: Create File Listing In C++ That Will Generate Line Number On Every Line Of Code

Apr 11, 2010

I have a project due for my Intro to C++ class and we are suppose to generate a file listing that will take an input of a C++ source code with .cpp extension and make a copy of it with a .lst extention that will have a line number preceding each and every line.

View 12 Replies View Related

Programming :: Parsing Xml File Using Shell Script And Generate Report In A PDF File?

Jul 9, 2009

parsing xml file using shell script and generate report in a PDF file

Xml file input:

<report>
<student name="x" father name="x1" class="first" Address="xyz">
<property name="sports" value="yes"/>
<property name="drawing" value="no"/>

[code]....

View 12 Replies View Related

Programming :: Using "dialog " To Generate Menu Base On Dir Contents

Oct 20, 2010

I'm just messing around trying to create a script that will give me a menu driven method of selecting a file from a directory. After doing some searching around on the web, I found that the "dialog" command might be able to provide what I need, but I'm not sure exactly if what I want is possible.

I was messing around with the --menu option and am getting pretty close, but not exactly what I want. Here's a snip of what I've been working with:

Code:

This gets me the results I want for the first option in the list, but the rest comes out a bit weird, as it's taking the directory contents and applying to the "tag" field as well. In fact, if there wasn't a need for the tag field, it would probably be working exactly as I want it to.

I plan on messing around a bit more to see if there is a workaround, but figured I'd post this just in case someone else had accomplished something similar. Essentially, this will be embedded in a script where each file in my $DIR variable will show in the menu and the selected file will end up in a variable for later use.

View 1 Replies View Related

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 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

Ubuntu :: SSH Banner Repeats Itself?

May 5, 2011

I performed an apt-get upgrade and now my SSH Welcome Banner looks like the following. You'll notice that the banner repeats itself. The bottom half is acutally "static" and doesn't change. The top part is what I would normally see. How do I remove the bottom portion of the banner? Or modify the banner? Using Ubuntu Server 10.04 LTS

[Code]....

View 4 Replies View Related

Red Hat :: SSH Banner Escape Codes?

Sep 22, 2010

I have modified /etc/issue with the following:

Code:
Today is d @
So when logging in locally you get todays date and time. I want this for SSH users as well

[code]....

View 1 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

Fedora :: Banner Sheet Cannot Be Disabled On F12

Dec 20, 2009

My F12 is connected to a Xerox DC432 printer on the network. The problem I'm facing is that banner sheet cannot be disable. The configuration setting on Administration->Printing showed that banner is off by default. "/etc/cups/printers.conf" file also have "JobSheets none none". I had the same problem with F11. Is there any step I'm missing? It doesn't seem to be problem of the printer itself because I could do this on a Windows OS.

View 1 Replies View Related







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