Largely useless scripts that'll perhaps save someone a few minutes or
at least a few keystrokes -- they've been done with simplicity, not
conciseness or efficiency, in mind. No usage info (fn) is provided.
convo/fmt is to be used with "generic" IRC logs like the one produced
by andrey's irc7 (which does not include timestamps), in order to get
some of the last lines of dialog, output in tabbed format for
legibility.
convo/fmt me nick /tmp/log 10
gets 10 latest lines of convo between 'me' and 'nick'
convo/fmt '#channel' '' /tmp/log 10
gets 10 latest lines of convo in #channel
chkill is a kill(1) equivalent for processes being run by, i.e., none
-- to be used by hostowner
it made restarting httpd happen in less keystrokes, and the excessive,
imitative, output is enthralling.
reminder for somethings,
and a cry for help regarding others,
ak
#!/bin/rc
j=''
chan=''
fn format{
if(~ $1 '#'*){
if(! ~ $1 $chan)
echo $1
chan=$1
shift
output $j $* |
awk '{print " " $0}' |
fmt
}
if not
output $j $* | fmt
j=$1
}
fn output{
if(~ $1 $2){
shift 2
echo ' ' $*
}
if not{
shift
echo
echo $*
}
}
grep -e $2^'.*PRIVMSG '^$1^'.*|^PRIVMSG '^$2^' :' $3 |
tail $4 |
sed '
s/^PRIVMSG ((#.*)?).* :/\1 ⇒ /g
s/:(.*)!.* PRIVMSG ((#.*)?).* :/\2 \1→ /g
s/
//g' |
while(line=`{read}) format $line
#!/bin/rc
for(i){
ps | grep $i |
while(line=`{read}){
echo 'chmod 777 /proc/'^$line(2)^'/note && #'^$line(7)^'
echo kill > /proc/'^$line(2)^'/note'
}
}