new kernelver script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,


It's about this script here:


http://www.kernelnewbies.org/scripts/kernelver


I know this might be trivial but as finger is often overloaded and/or firewalled I'd suggest using http instead.


Feel free to substitute wget with whatever tool you believe to be most commonly used / portable / whatever.

Additional dependencies: wget


thanks in advance!





#!/bin/bash


##finger @www.kernel.org > .kv.new
#
# www.kernel.org said:
#
# August 21, 2003: Please don't use finger.kernel.org for any sort of automatic
# monitoring. The number of automatic bots hitting this port is causing the
# finger daemon to shut down more often than not. The same information is
# available from http://www.kernel.org/kdist/finger_banner.


wget -q -O .kv.new http://www.kernel.org/kdist/finger_banner

# Remove 0 byte new files (something went wrong)
find . -maxdepth 1 -size 0 -name .kv.new -exec rm {} \;

if [ ! -f .kv.new ] ; then
       exit
fi

# First time we run, save to old, and exit
if [ ! -f .kv.old ] ; then
       mv -f .kv.new .kv.old
       exit
fi

# Subsequent run, find differences.
if [ -f .kv.new ] ; then
       diff -u .kv.old .kv.new >.kv.diff
       find . -maxdepth 1 -size 0 -name .kv.diff -exec rm {} \;

       if [ -f .kv.diff ] ; then
               cat .kv.new
               rm -f .kv.diff
       fi
       mv -f .kv.new .kv.old
fi

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux