Sponsored Content
Operating Systems Solaris How to say goodbye to a fellow admin via Shell script.? Post 302970461 by os2mac on Wednesday 6th of April 2016 06:45:23 PM
Old 04-06-2016
He is world renowned for his terse emails:

My solution:

Greybeard,

WRT the old joke about replacing people with small shell scripts. I guess I'll have to implement this as a cron now:


"greybeard.sh" 8 lines, 505 characters
Code:
 
 #!/usr/bin/bash
 BE=`find_kernel_patchLVL2.sh|grep "active(yes"|awk -F- '{print $2}'|cut -c 1-2`
 ABE=`find_kernel_patchLVL2.sh|grep "active( no"|awk -F- '{print $2}'|cut -c 1-2`
 if [ "$ABE" -gt "$BE" ]
         then
         mailx -r greybeard@example.com -s "`hostname` is on the wrong boot environment" \
         unix@example.com<<<$'\n please reboot it to the correct BE, \ngratitude \
         \n\n None of us are as smart as all of us.\n Spam me, please\n'
 fi

 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

shell or admin fires the db

Q for the admin guys, When the server (Spark) is rebooted does a shell starts database, connection to database, and etc or would have to be the administrator log on as database admin and start the database? If it starts from the shell how would the script look like since the dba has access to the... (1 Reply)
Discussion started by: softarch
1 Replies

2. Shell Programming and Scripting

how to connect to admin accout through script

hi everyone i'm running script in c-shell and i want this script to connect to admin account in order to run other script in k-shell. after that i want the script to be severed from the admin account and to continue with the regular commands example: my script call cs-customers echo"starting... (16 Replies)
Discussion started by: naamas03
16 Replies

3. Shell Programming and Scripting

Script stops running the remaining checks after becoming admin

Hi all, I encountered a problem where my script stops running the remaining checks after becoming an admin that is written within the script. For example: ========================================= #!/bin/sh check 1 # Runs successfully check 2 # Runs successfully /com/bin/admin #... (1 Reply)
Discussion started by: seanchew
1 Replies

4. AIX

script for finding all the users with GID 0 ( admin group )

Hi Friends, I am trying to write a script for finding all the users with the GID 0 i.e. Admin users. can you please help me on this. (1 Reply)
Discussion started by: anoopraok
1 Replies

5. What is on Your Mind?

Windows Admin switching to *nix Admin

I'm currently a Windows admin and have wanted to jump ship to the *nix side for a while now. I've been studying both through an lpic level 1 manual as I have time (focusing on debian), and a solaris 10 cert book. The problem is I only have a handful of hours a week to study, and my current job... (3 Replies)
Discussion started by: bobwilson
3 Replies

6. Shell Programming and Scripting

Script to Send Email to a user when an admin kills process

Can anyone create or give me a script that I can use to email a user automatically when I kill one of their processes? Or Can you give me a script to allow me to email a user (entering email manually) when a process is killed? Like showing what the PID was and a reason the admin killed it? Is... (2 Replies)
Discussion started by: JoeGazz84
2 Replies

7. What is on Your Mind?

Regarding Admin life either as DBA or UNIX Linux admin

I am planning to choose my career as Unix/Linux Admin or a DBA. But I have come to know from forums and few admins like the job will be 24/7. I have few questions on that. Can we get "DAY" shifts in any one of the admin Job ? Can't we have shift timings in any company ? Eventhough the... (7 Replies)
Discussion started by: Jacktts
7 Replies
NWDIAG(1)						      General Commands Manual							 NWDIAG(1)

NAME
rackdiag - generate rack-structure-diagram image file from spec-text file. SYNOPSIS
rackdiag [options] files DESCRIPTION
This manual page documents briefly the rackdiag commands. rackdiag is generate sequence-diagram image file from spec-text file. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the Info files. -h, --help show this help message and exit. --version show program's version number and exit. -a, --antialias Pass diagram image to anti-alias filter. -c FILE, --config=FILE read configurations from FILE. -o FILE write diagram to FILE. -f FONT, --font=FONT use FONT to draw diagram. -T TYPE Output diagram as TYPE format. SEE ALSO
The programs are documented fully by http://blockdiag.com/en/nwdiag/ AUTHOR
rackdiag was written by Takeshi Komiya <i.tkomiya@gmail.com> This manual page was written by Kouhei Maeda <mkouhei@palmtb.net>, for the Debian project (and may be used by others). June 11, 2011 NWDIAG(1)
All times are GMT -4. The time now is 05:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy