commit d3c6e2990234936b45422b2724f8e7a2feb20b92 Author: Nico Schottelius Date: Thu Jul 20 09:54:37 2006 +0200 Initial commit diff --git a/0toX b/0toX new file mode 100755 index 0000000..48f0400 --- /dev/null +++ b/0toX @@ -0,0 +1,16 @@ +#!/bin/bash +# @Descripton: +# Move blender output files to your +# extension +# @Author: Nico Schottelius +# @Date: April 2., 1999 +# @Copying: See GNU GENERAL PUBLIC LICENSE ; Version 2, June 1991 + +if [ -z $1 ] + then echo "Please choose extension" + echo "Usage: $0 " +else + for i in [0-9][0-9][0-9][0-9] + do mv $i $i.$1 + done +fi diff --git a/1440disk b/1440disk new file mode 100755 index 0000000..ea898a5 --- /dev/null +++ b/1440disk @@ -0,0 +1,4 @@ +#!/bin/bash +fdformat /dev/fd0u1440 +mformat -s 16 -t 80 -h 2 a: +mdir a: diff --git a/2xterm b/2xterm new file mode 100755 index 0000000..06ff894 --- /dev/null +++ b/2xterm @@ -0,0 +1,3 @@ +#!/bin/sh +xterm -ls -title "F1rSt X-T3Rm" & +xterm -ls -title "²×-13erM" & diff --git a/3xterm b/3xterm new file mode 100755 index 0000000..6a5efa6 --- /dev/null +++ b/3xterm @@ -0,0 +1,4 @@ +#!/bin/sh +xterm -ls -title "--irst 0n3xx" & +xterm -ls -title ">>> 2nd <<<" & +xterm -ls -title "www.3rd.xterm" & diff --git a/4xterm b/4xterm new file mode 100755 index 0000000..8d56249 --- /dev/null +++ b/4xterm @@ -0,0 +1,5 @@ +#!/bin/sh +xterm -ls -title "Welcome to the world of darkness -#1#-" & +xterm -ls -title "Welcome to the cinema -#2#-" & +xterm -ls -title "Welcome to the paradis on earth -#3#-" & +xterm -ls -title "Welcome to the Universe -#4#-" & diff --git a/720disk b/720disk new file mode 100755 index 0000000..2097c7c --- /dev/null +++ b/720disk @@ -0,0 +1,4 @@ +#!/bin/bash +fdformat /dev/fd0h720 +mformat -s 8 -t 80 -h 2 a: +mdir a: diff --git a/Bash-Prompt-HOWTO b/Bash-Prompt-HOWTO new file mode 100755 index 0000000..798738b --- /dev/null +++ b/Bash-Prompt-HOWTO @@ -0,0 +1,59 @@ + #!/bin/bash + # + # This file echoes a bunch of colour codes to the terminal to demonstrate + # what's available. Each line is one colour on black and gray + # backgrounds, with the code in the middle. Verified to work on white, + # black, and green BGs (2 Dec 98). + # + echo " On Light Gray: On Black:" + echo -e "\033[47m\033[1;37m White \033[0m\ + 1;37m \ + \033[40m\033[1;37m White \033[0m" + echo -e "\033[47m\033[37m Light Gray \033[0m\ + 37m \ + \033[40m\033[37m Light Gray \033[0m" + echo -e "\033[47m\033[1;30m Gray \033[0m\ + 1;30m \ + \033[40m\033[1;30m Gray \033[0m" + echo -e "\033[47m\033[30m Black \033[0m\ + 30m \ + \033[40m\033[30m Black \033[0m" + echo -e "\033[47m\033[31m Red \033[0m\ + 31m \ + \033[40m\033[31m Red \033[0m" + echo -e "\033[47m\033[1;31m Light Red \033[0m\ + 1;31m \ + \033[40m\033[1;31m Light Red \033[0m" + echo -e "\033[47m\033[32m Green \033[0m\ + 32m \ + \033[40m\033[32m Green \033[0m" + echo -e "\033[47m\033[1;32m Light Green \033[0m\ + 1;32m \ + \033[40m\033[1;32m Light Green \033[0m" + echo -e "\033[47m\033[33m Brown \033[0m\ + 33m \ + \033[40m\033[33m Brown \033[0m" + echo -e "\033[47m\033[1;33m Yellow \033[0m\ + 1;33m \ + \033[40m\033[1;33m Yellow \033[0m" + echo -e "\033[47m\033[34m Blue \033[0m\ + 34m \ + \033[40m\033[34m Blue \033[0m" + echo -e "\033[47m\033[1;34m Light Blue \033[0m\ + 1;34m \ + \033[40m\033[1;34m Light Blue \033[0m" + echo -e "\033[47m\033[35m Purple \033[0m\ + 35m \ + \033[40m\033[35m Purple \033[0m" + echo -e "\033[47m\033[1;35m Pink \033[0m\ + 1;35m \ + \033[40m\033[1;35m Pink \033[0m" + echo -e "\033[47m\033[36m Cyan \033[0m\ + 36m \ + \033[40m\033[36m Cyan \033[0m" + echo -e "\033[47m\033[1;36m Light Cyan \033[0m\ + 1;36m \ + \033[40m\033[1;36m Light Cyan \033[0m" + +echo "--------------------------------------------" + echo -e "\033[33m\033[1;39m Light Cyan \033[0m 1;36m \033[40m\033[1;36m Light Cyan \033[0m" diff --git a/Bash-Prompt-HOWTO-colors b/Bash-Prompt-HOWTO-colors new file mode 100755 index 0000000..798738b --- /dev/null +++ b/Bash-Prompt-HOWTO-colors @@ -0,0 +1,59 @@ + #!/bin/bash + # + # This file echoes a bunch of colour codes to the terminal to demonstrate + # what's available. Each line is one colour on black and gray + # backgrounds, with the code in the middle. Verified to work on white, + # black, and green BGs (2 Dec 98). + # + echo " On Light Gray: On Black:" + echo -e "\033[47m\033[1;37m White \033[0m\ + 1;37m \ + \033[40m\033[1;37m White \033[0m" + echo -e "\033[47m\033[37m Light Gray \033[0m\ + 37m \ + \033[40m\033[37m Light Gray \033[0m" + echo -e "\033[47m\033[1;30m Gray \033[0m\ + 1;30m \ + \033[40m\033[1;30m Gray \033[0m" + echo -e "\033[47m\033[30m Black \033[0m\ + 30m \ + \033[40m\033[30m Black \033[0m" + echo -e "\033[47m\033[31m Red \033[0m\ + 31m \ + \033[40m\033[31m Red \033[0m" + echo -e "\033[47m\033[1;31m Light Red \033[0m\ + 1;31m \ + \033[40m\033[1;31m Light Red \033[0m" + echo -e "\033[47m\033[32m Green \033[0m\ + 32m \ + \033[40m\033[32m Green \033[0m" + echo -e "\033[47m\033[1;32m Light Green \033[0m\ + 1;32m \ + \033[40m\033[1;32m Light Green \033[0m" + echo -e "\033[47m\033[33m Brown \033[0m\ + 33m \ + \033[40m\033[33m Brown \033[0m" + echo -e "\033[47m\033[1;33m Yellow \033[0m\ + 1;33m \ + \033[40m\033[1;33m Yellow \033[0m" + echo -e "\033[47m\033[34m Blue \033[0m\ + 34m \ + \033[40m\033[34m Blue \033[0m" + echo -e "\033[47m\033[1;34m Light Blue \033[0m\ + 1;34m \ + \033[40m\033[1;34m Light Blue \033[0m" + echo -e "\033[47m\033[35m Purple \033[0m\ + 35m \ + \033[40m\033[35m Purple \033[0m" + echo -e "\033[47m\033[1;35m Pink \033[0m\ + 1;35m \ + \033[40m\033[1;35m Pink \033[0m" + echo -e "\033[47m\033[36m Cyan \033[0m\ + 36m \ + \033[40m\033[36m Cyan \033[0m" + echo -e "\033[47m\033[1;36m Light Cyan \033[0m\ + 1;36m \ + \033[40m\033[1;36m Light Cyan \033[0m" + +echo "--------------------------------------------" + echo -e "\033[33m\033[1;39m Light Cyan \033[0m 1;36m \033[40m\033[1;36m Light Cyan \033[0m" diff --git a/DIR_aendern/datum.aendern b/DIR_aendern/datum.aendern new file mode 100644 index 0000000..93b7fee --- /dev/null +++ b/DIR_aendern/datum.aendern @@ -0,0 +1,9 @@ +#!/bin/sh + +read -p "Datum: " mydate + +for a in $* + do + cat $a | sed "s/DATUM/${mydate}/g" > $a.tmp + mv $a.tmp $a + done diff --git a/DIR_aendern/description.aendern b/DIR_aendern/description.aendern new file mode 100644 index 0000000..feb8af2 --- /dev/null +++ b/DIR_aendern/description.aendern @@ -0,0 +1,9 @@ +#!/bin/sh + +read -p "Beschreibung: " mydesc + +for a in $* + do + cat $a | sed "s/DESCRIPTION/${mydesc}/g" > $a.tmp + mv $a.tmp $a + done diff --git a/DIR_aendern/ident.aendern b/DIR_aendern/ident.aendern new file mode 100644 index 0000000..362d3d5 --- /dev/null +++ b/DIR_aendern/ident.aendern @@ -0,0 +1,9 @@ +#!/bin/sh + +read -p "Identifikation: " myident + +for a in $* + do + cat $a | sed "s/IDENT/${myident}/g" > $a.tmp + mv $a.tmp $a + done diff --git a/DIR_aendern/keywords.aendern b/DIR_aendern/keywords.aendern new file mode 100644 index 0000000..4b5df60 --- /dev/null +++ b/DIR_aendern/keywords.aendern @@ -0,0 +1,9 @@ +#!/bin/sh + +read -p "Keywords: " mykey + +for a in $* + do + cat $a | sed "s/KEYWORDS/${mykey}/g" > $a.tmp + mv $a.tmp $a + done diff --git a/DIR_aendern/rechte.aendern b/DIR_aendern/rechte.aendern new file mode 100644 index 0000000..739948d --- /dev/null +++ b/DIR_aendern/rechte.aendern @@ -0,0 +1,9 @@ +#!/bin/sh + +read -p "Rechte gehoeren: " myrechte + +for a in $* + do + cat $a | sed "s/FIRMA/${myrechte}/g" > $a.tmp + mv $a.tmp $a + done diff --git a/DIR_aendern/titel.aendern b/DIR_aendern/titel.aendern new file mode 100644 index 0000000..7b2da50 --- /dev/null +++ b/DIR_aendern/titel.aendern @@ -0,0 +1,9 @@ +#!/bin/sh + +read -p "Titel: " mytitle + +for a in $* + do + cat $a | sed "s/THE_TITLE/${mytitle}/g" > $a.tmp + mv $a.tmp $a + done diff --git a/MOVE-inodes.sh b/MOVE-inodes.sh new file mode 100755 index 0000000..47f066e --- /dev/null +++ b/MOVE-inodes.sh @@ -0,0 +1,14 @@ +for a in `seq 1 9`; do + for b in `seq 1 9`; do + for c in `seq 1 9`; do + for d in `seq 1 9`; do + for e in `seq 1 9`; do + for f in `seq 1 9`; do + mkdir -p $a/$b/$c/$d/$e/$f + mv -f \$Inode$a$b$c$d$e$f* $a/$b/$c/$d/$e/$f 2>/dev/null + done + done + done + done + done +done diff --git a/add-mutt+procmail-autosort b/add-mutt+procmail-autosort new file mode 100755 index 0000000..93165f8 --- /dev/null +++ b/add-mutt+procmail-autosort @@ -0,0 +1,52 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 22-Aug-2003 +# Last Modified: 2004-08-22 +# Add mutt hooks and procmail entries at the same time +# Please use a 'DEFAULT' entry in procmailrc to make it work +# + +PROCMAILRC=~/.procmailrc +MUTT_MAILBOXES=~/.mutt/mailboxes +MUTT_HEADERS=~/.mutt/hooks +PROCMAIL_MATCH='(^TO|^Delivered-To: )' # email after that + +echo generating new mutt and new procmailentry +read -p "To Email: " email +read -p "To which folder: " folder +read -p "Your name: " name +read -p "Comment: " comment +echo "Email=$email" +echo "Name=$name" +echo "Comment=$comment" +echo "Folder=$folder" +read -p "Enter to continue" bla + +# procmail: insert at first line +cat << EOF >> $PROCMAILRC +### autogenerated by add-mutt+procmail-autosort ($comment) +:0 +* $PROCMAIL_MATCH$email +$folder/ + +EOF + +# mutt/checking +cat << EOF >> $MUTT_MAILBOXES +### for $email / $name / $comment +mailboxes +$folder/ +EOF + +# mutt/headers +cat << EOF >> $MUTT_HEADERS + +# $comment +folder-hook $folder 'my_hdr From: $name <$email>' +folder-hook $folder 'set from="$email"' +EOF + +# folder; {new,cur,tmp} does not work in ash +mkdir -p ~/Maildir/$folder/new +mkdir -p ~/Maildir/$folder/cur +mkdir -p ~/Maildir/$folder/tmp diff --git a/add-mutt+procmail-autosort-2004-04-29 b/add-mutt+procmail-autosort-2004-04-29 new file mode 100644 index 0000000..8379b7c --- /dev/null +++ b/add-mutt+procmail-autosort-2004-04-29 @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 22-Aug-2003 +# Last Modified: 29-Apr-2004 +# Add mutt hooks and procmail entries at the same time +# Please use a 'DEFAULT' entry in procmailrc to make it work +# + +PROCMAILRC=~/.procmailrc +MUTT_MAILBOXES=~/.mutt/mailboxes +MUTT_HEADERS=~/.mutt/hooks +#PROCMAIL_MATCH="^TO" # email after that +PROCMAIL_MATCH="^Delivered-To: " # email after that + +echo generating new mutt and new procmailentry +read -p "To Email: " email +read -p "To which folder: " folder +read -p "Your name: " name +read -p "Comment: " comment +read -p "Email=$email, name=$name, comment=$comment and folder=$folder. Enter to continue" bla + +# procmail: insert at first line +cat << EOF >> $PROCMAILRC +### autogenerated by add-mutt+procmail-autosort ($comment) +:0 +* $PROCMAIL_MATCH$email +$folder/ + +EOF + +# mutt/checking +cat << EOF >> $MUTT_MAILBOXES +### for $email / $name / $comment +mailboxes +$folder/ +EOF + +# mutt/headers +cat << EOF >> $MUTT_HEADERS + +# $comment +folder-hook $folder 'my_hdr From: $name <$email>' +folder-hook $folder 'set from="$email"' +EOF + +# folder; {new,cur,tmp} does not work in ash +mkdir -p ~/Maildir/$folder/new +mkdir -p ~/Maildir/$folder/cur +mkdir -p ~/Maildir/$folder/tmp diff --git a/add-mutt+procmail-autosort01 b/add-mutt+procmail-autosort01 new file mode 100755 index 0000000..8a00d38 --- /dev/null +++ b/add-mutt+procmail-autosort01 @@ -0,0 +1,42 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 22-Aug-2003 +# Last Modified: 17-Jan-2004 +# Now adding procmail entries at the beginning of the file +# + +PROCMAILRC=~/.procmailrc +MUTT_MAILBOXES=~/.mutt/mailboxes +MUTT_HEADERS=~/.mutt/hooks + +echo generating new mutt and new procmailentry +read -p "To Email: " email +read -p "To which folder: " folder +read -p "your name: " name +read -p "Email=$email, name=$name and folder=$folder. Enter to continue" bla + +# procmail: insert at first line +cat << EOF >> $PROCMAILRC +### autogenerated by add-mutt+procmail-autosort +:0 +* ^TO$email +$folder/ + +EOF + +# mutt/checking +cat << EOF >> $MUTT_MAILBOXES +### for $email / $name +mailboxes +$folder/ +EOF + +# mutt/headers +cat << EOF >> $MUTT_HEADERS + +folder-hook $folder 'my_hdr From: $name <$email>' +folder-hook $folder 'set from="$email"' +EOF + +# folder +mkdir -p ~/Maildir/$folder/{new,cur,tmp} diff --git a/add_tele_dns b/add_tele_dns new file mode 100755 index 0000000..288452c --- /dev/null +++ b/add_tele_dns @@ -0,0 +1,17 @@ +FORWARD=/etc/bind/tele.wdt.intern.hosts +REVERSE=/etc/bind/10.10.1.rev + +read -p "Name: " name +read -p "Telefonnummer: " tele +read -p "Eintragen (strg+c zum abbrechen) " + +if [ "$tele" -le 255 ]; then + echo "$name in A 10.10.1.$tele" >> $FORWARD + echo "$tele in ptr $name.tele.wdt.intern." >> $REVERSE +else + echo "$name bekommt keinen A eintrag, da zu grosse nummer" +fi + +echo "$name in TXT \"$tele\"" >> $FORWARD + +killall -HUP named diff --git a/add_tele_dns.cmd b/add_tele_dns.cmd new file mode 100755 index 0000000..0c8f016 --- /dev/null +++ b/add_tele_dns.cmd @@ -0,0 +1,22 @@ +if [ $# -ne 2 ]; then + echo noe. $0 name telefon + exit 1 +fi + +FORWARD=/etc/bind/tele.wdt.intern.hosts +REVERSE=/etc/bind/10.10.1.rev + +read -p "Name: " name +read -p "Telefonnummer: " tele +read -p "Eintragen (strg+c zum abbrechen) " + +if [ "$tele" -le 255 ]; then + echo "$name in A 10.10.1.$tele" >> $FORWARD + echo "$tele in ptr $name.tele.wdt.intern." >> $REVERSE +else + echo "$name bekommt keinen A eintrag, da zu grosse nummer" +fi + +echo "$name in TXT \"$tele\"" >> $FORWARD + +killall -HUP named diff --git a/ae_parser b/ae_parser new file mode 100755 index 0000000..ecf477c --- /dev/null +++ b/ae_parser @@ -0,0 +1,44 @@ +# Date: 15th of March 2k+1 +# Last Changed: 24th of February 2k+4 +# Author: Nico Schottelius +# Description: This script searches for the following strings +# and will substitute them with the right German Characters +# +# _ae_ = ä +# _ue_ = ü +# _oe_ = ö +# _Ae_ = Ä +# _Oe_ = Ö +# _Ue_ = Ü +# _sz_ = ß (not _ss_ like it was earlier) +# + + +if [ $# -lt 1 ]; then + echo `basename $0`': file(s)' + echo 'Hey, hey guy, what to convert ?' + exit 1 +fi + +for mfile in $@; do + + if [ ! -f "$mfile" ]; then + echo "Keine Datei namens $mfile gefunden. Skip." + break + fi + + # something other programs do not use + G_STR=".`date +%s%M%U`-`basename $0`-`basename $mfile`-$$" + + echo "Using $G_STR to convert $mfile ..." + + cat "$mfile" | sed -e 's/_ae_/ä/g' -e 's/_ue_/ü/g' -e 's/_oe_/ö/g' \ + -e 's/_Ae_/Ä/g' -e 's/_Ue_/Ü/g' -e 's/_Oe_/Ö/g' -e 's/_sz_/ß/g' > "$G_STR" + + if [ $? = 0 ]; then + mv "$G_STR" "$mfile" + else + echo "Replacing failed, don't replace original." + fi + +done diff --git a/ae_parser-2004-02-24 b/ae_parser-2004-02-24 new file mode 100755 index 0000000..cafd634 --- /dev/null +++ b/ae_parser-2004-02-24 @@ -0,0 +1,56 @@ +# Date: 15th of March 2k+1 +# Last Changed: 11th of January 2k+4 +# Author: Nico Schottelius +# Description: This script searches for the following strings +# and will substitute them with the right German Characters +# +# _ae_ = ä +# _ue_ = ü +# _oe_ = ö +# _Ae_ = Ä +# _Oe_ = Ö +# _Ue_ = Ü +# _ss_ = ß +# + + +if [ $# -lt 1 ]; then + echo `basename $0`': file(s)' + echo 'Hey, hey guy, what to convert ?' + exit 1 +fi + +for mfile in $@; do + + if [ ! -f "$mfile" ]; then + echo "Keine Datei namens $mfile gefunden. Skip." + break + fi + + cp -f "$mfile" "$mfile".ae_parser-orig + + # something other programs do not use + G_STR=".`date +%s%M%U`-`basename $0`-`basename $mfile`-$$" + + cat $mfile | sed 's/_ae_/ä/g' > $G_STR + mv $G_STR $mfile + + cat $mfile | sed 's/_ue_/ü/g' > $G_STR + mv $G_STR $mfile + + cat $mfile | sed 's/_oe_/ö/g' > $G_STR + mv $G_STR $mfile + + cat $mfile | sed 's/_Ae_/Ä/g' > $G_STR + mv $G_STR $mfile + + cat $mfile | sed 's/_Ue_/Ü/g' > $G_STR + mv $G_STR $mfile + + cat $mfile | sed 's/_Oe_/Ö/g' > $G_STR + mv $G_STR $mfile + + cat $mfile | sed 's/_ss_/ß/g' > $G_STR + mv $G_STR $mfile + +done diff --git a/ae_parser-2004-06-17 b/ae_parser-2004-06-17 new file mode 100755 index 0000000..533579c --- /dev/null +++ b/ae_parser-2004-06-17 @@ -0,0 +1,49 @@ +# Date: 15th of March 2k+1 +# Last Changed: 17th of June 2k+1 +# Author: Nico Schottelius +# Description: This script searches for the following strings +# and will substitute them with the right German Characters +# +# _ae_ = ä +# _ue_ = ü +# _oe_ = ö +# _Ae_ = Ä +# _Oe_ = Ö +# _Ue_ = Ü +# _ss_ = ß +# + + +if [ $# -lt 1 ]; then + echo `basename $0`': file(s)' + echo 'Hey, hey guy, what to convert ?' + exit 1 +fi + +for mfile in $@; do + + # something other programs do not use + G_STR=".`date +%s%M%U`-`basename $0`-`basename $mfile`" + + cat $mfile | sed 's/_ae_/ä/g' > $G_STR + mv $G_STR $mfile + + cat $mfile | sed 's/_ue_/ü/g' > $G_STR + mv $G_STR $mfile + + cat $mfile | sed 's/_oe_/ö/g' > $G_STR + mv $G_STR $mfile + + cat $mfile | sed 's/_Ae_/Ä/g' > $G_STR + mv $G_STR $mfile + + cat $mfile | sed 's/_Ue_/Ü/g' > $G_STR + mv $G_STR $mfile + + cat $mfile | sed 's/_Oe_/Ö/g' > $G_STR + mv $G_STR $mfile + + cat $mfile | sed 's/_ss_/ß/g' > $G_STR + mv $G_STR $mfile + +done diff --git a/ae_to_latex b/ae_to_latex new file mode 100755 index 0000000..2b21103 --- /dev/null +++ b/ae_to_latex @@ -0,0 +1,47 @@ +# Date: 15th of March 2k+1 +# Last Changed: 24th of February 2k+4 +# Author: Nico Schottelius +# Description: This script searches for the following strings +# and will substitute them with the right German Characters for Latex +# +# \"a = ä +# \"u = ü +# \"o = ö +# \"A = Ä +# \"O_ = Ö +# \"U = Ü +# \ss{} = ß (not _ss_ like it was earlier) +# + + +if [ $# -lt 1 ]; then + echo `basename $0`': file(s)' + echo 'Hey, hey guy, what to convert ?' + exit 1 +fi + +for mfile in $@; do + + if [ ! -f "$mfile" ]; then + echo "Keine Datei namens $mfile gefunden. Skip." + break + fi + + # something other programs do not use + G_STR=".`date +%s%M%U`-`basename $0`-`basename $mfile`-$$" + + echo "Using $G_STR to convert $mfile ..." + + cat "$mfile" | sed -e 's/ä/\\"a/g' -e 's/ü/\\"u/g' -e 's/ö/\\"o/g' \ + -e 's/_ae_/\\"a/g' -e 's/_ue_/\\"u/g' -e 's/_oe_/\\"o/g' \ + -e 's/_Ae_/\\"A/g' -e 's/_Ue_/\\"U/g' -e 's/_Oe_/\\"O/g' \ + -e 's/_sz_/\ss{}/g' -e 's/ä/\\"a/g' -e 's/ü/\\"u/g' -e 's/ö/\\"o/g' \ + -e 's/Ä/\\"A/g' -e 's/Ü/\\"U/g' -e 's/Ö/\\"O/g' -e 's/ß/\\ss{}/g'>"$G_STR" + + if [ $? = 0 ]; then + mv "$G_STR" "$mfile" + else + echo "Replacing failed, don't replace original." + fi + +done diff --git a/alive.sh b/alive.sh new file mode 100644 index 0000000..a205a43 --- /dev/null +++ b/alive.sh @@ -0,0 +1,2 @@ +#!/bin/sh +while true; do echo alive..`date +%s` ; sleep 1; done diff --git a/all_your_bash.sh b/all_your_bash.sh new file mode 100755 index 0000000..29b5699 --- /dev/null +++ b/all_your_bash.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# All your bash are belong to us... +# This is a harmless bash script... really! +# Written out of pure boredom. +# Terminal capable of ANSI color sequences recommended. + +# - fuzzy + +__="echo -ne ";___="return";:(){ [ $1 -lt 10 ] || { $__ " "; $___;}; +[ $((($4*$4)+($5*$5))) -gt 40000000 ] && { $__ "\033[3"$1"m##";$___;}; +: $(($1+1)) $2 $3 $((((($4*$4)-($5*$5))/1000)+$2)) $(((2*$4*$5)/1000+$3));};:_ (){ +[ $2 -lt 1600 ] || { $__ "\n" ;$___;};: 0 $2 $1 0 0;:_ $1 $(($2+100 ));};:__(){ +[ $1 -lt 1600 ] || $___;:_ $1 -2500;:__ $(($1+100));};:__ -1500 diff --git a/ampersand_to_newline b/ampersand_to_newline new file mode 100755 index 0000000..656b1a1 --- /dev/null +++ b/ampersand_to_newline @@ -0,0 +1 @@ +cat test | perl -e 'while(<>) { s/&/\n/; print $_; }' diff --git a/apmcount b/apmcount new file mode 100755 index 0000000..0d9fb54 --- /dev/null +++ b/apmcount @@ -0,0 +1,245 @@ +#!/bin/sh +# Author: Nico Schottelius +# Date: 10th of April 2k+1 +# Last Modified: 27th of June 2k+2 +# Version: 0.7 +# Comment: This tool shows how many minutes are one percent and at +# the end it shows the time the battery would live, if it has 100% +# capacity. +# +# +# BUGS: +# +# - The first values is most times not so good, because we didn't really +# catch one complete percent; FIXED: 11th of April 2k+1 +# +# - if you stop before we've 2 values, awk will get a division through zero! +# FIXED: 11th of April 2k+1 +# +# Changelog: +# +# 27th of June 2002: +# - fixed bug: when charging, apmcount said you lost percent...fixed through +# grep -v "battery charging" +# +# 11th of April 2001: +# - Ahh! I am awake again and now it seems apmcount becomes some kind of +# stable. Version 0.3 looks pretty good, although it still has the awk-zero- +# division bug. Also sometimes when you kill apmcount early there are some +# bad messages from the shell; Currently working on 0.4 to fix all errors +# and maybe typos. Version 0.5 won't have the debug messages in it +# anymore. +# +# 10th of April 2001: +# - I need to know how long the battery of my new notebooks lasts. +# As I didn't find anything good I started scripting this here. +# +# +# 27th of April 2001: +# Just pasted this old picture I have found written by me. +# +# / +# run as long as we don't got a signal +# | +# | +# save_percent in temp_p +# | +# | +# save_time_in_gnu_style in temp_t +# | +# | +# if temp_p not equals last i (i). +# --> the percentage has changed +# +# +# +# 1st of May 2k+1: Moved INTERVAL to the top of the script, +# so it is easier for the user to change the interval. +# +# +# APMCOUNT runs pretty fine, if you let it run for about +# 10 minutes it is more or less exactly :) +# + +set +x + + +# How many records to skip ? One is normally quiet good! +SKIP=1 + +# INTERVAL: How long to sleep (in secs) and check for the time again +INTERVAL="5" + + +#### MESSAGES TO THE USER ##### + +PERCENT_ONE="This percentage lasted (in secs): " +PERCENT_ALL="The complete battery would aprox. live about (minutes)" +TIME_RAN="We ran so long:" +PERCENT_START="We started at percent:" +PERCENT_STOP="We stoped at percent:" +USED_PERCENT="We used so many percent of battery:" +ONE_HOUR_TIME="For one hour running this machine we need" +TO_LESS_PERCENT="Sorry, we ran to short and didn't get enough percents. \ +Please take some more time to run `basename $0`." +TO_LESS_TIME="Sorry, we ran to short. Give me some more time to run." +SORRY_ONLINE="Sorry, running apmcount while beeing AC-Online is senseless." + +####### END OF MESSAGES ######## + + +################ STOP CHANGING OR NOT, WHAT YOU WANT :) ##################### + +# TRAP signals +trap EXIT="yes" SIGINT SIGSEGV SIGQUIT SIGTERM + +# in SAVE we'll save the time it needed for the last percent +# in TIME is the time saved +SAVE="" +TIME="" + +# temporary memory p=percent, t=time +temp_p="" +temp_t="" + +# i is the count variable +i="0" + +# We use START later, but cut out the first value +START=$[$i+$SKIP] + +# howto get the seconds +DATE="date +%s" + +# Set the first value +eval SAVE_$i=`apm | awk '{ print $6 }' | sed 's/\(.*\)%/\1/g'` +eval TIME_$i=`$DATE` + +# Shall we exit +EXIT="no" + +# check for status: Online/offline + +if [ "`apm | grep "battery charging"`" != "" ]; then + echo $SORRY_ONLINE + exit 1 +fi + +# do it until we recieve the ctrl+C sequenz +while [ $EXIT != "yes" ] ; do + + # position number sixth is "XX%" (67%), eleminate the percent sign + # with % sign + temp_p=`apm | awk '{ print $6 }' | sed 's/\(.*\)%/\1/g'` + + # Save the current time + temp_t=`$DATE` + + # Check whether the values are different or not, if yes, + # increment i, and place the values in the right place + # else do nothing + if [ `eval echo \\$SAVE_$i` -ne `echo $temp_p` ];then + + # increment i + i=$[$i+1]; + + # place the data in our pseudo array + eval SAVE_$i=\$temp_p + + # place the time in our pseudo array + eval TIME_$i=\$temp_t + + # Display the time the last percent lasted + eval echo \$PERCENT_ONE \$[\$TIME_$i - \$TIME_$[$i-1]] + + fi + + # sleep until we repeat the while loop again + sleep $INTERVAL + +# end of days +done + +# now calculate the rest +# We got the time in seconds: +# The last time - the first time + +# We stop at the last element +END=$i + + +################################################ +# Check whether we can start the report or not. +################################################ + + +# If $i (the count variable) is less than / equal to Start, forget the thing +# At least 2 values are needed for division :) + +if [ $i -le $START ]; then + echo $TO_LESS_PERCENT + exit 1 +fi + + +# allcountedpercent must be > 0 +# allcountedpercent = Start_percent(20) - End_percent (10) +# Start_percent = counted_percents (i) - SKIP (defined above) +# Also the time should be more than zero + +# percentage is getting less, so start - end +eval COMPLETE_PERCENT="\$[\$SAVE_$START - \$SAVE_$END]" + +# First the time, time is getting higher, so END - START +eval COMPLETE_SECS="\$[\$TIME_$END - \$TIME_$START]" + + +# if not greater than 0 +if [ ! $COMPLETE_PERCENT -gt 0 ];then + echo $TO_LESS_PERCENT + exit 1 +fi + +# if not greater than 0 +if [ ! $COMPLETE_SECS -gt 0 ];then + echo $TO_LESS_TIME + exit 1 +fi + +########## REPORT BEGINS ############ +echo $TIME_RAN $COMPLETE_SECS +eval echo \$PERCENT_START \$SAVE_$START +eval echo \$PERCENT_STOP \$SAVE_$END +echo $USED_PERCENT $COMPLETE_PERCENT + +# In German we call the "Dreisatz", you should understand the next lines +# +# We've X seconds and X percent, both are present. +# We look for 100 percent and 3600 seconds +# +# X percent / X * 100 = 100 percent +# X seconds / X * 3600 = 1 hour +# +# So if we wanna have the time 100, the battery would last with +# 100 %, we need the following: +# 100_percent_time = ( time_lasted / percent_needed ) * 100 +# +# +# We ran X minutes / seconds with X percent battery power +# We run 60 minutes with X minutes / X * 60 (or 3600 for seconds) +# ONE_HOUR= ( percents_needed / time_lasted ) * 3600 +# +# + +HUNDRED_P_TIME=`echo "$COMPLETE_SECS $COMPLETE_PERCENT" | \ +awk '{ print ($1 / $2) * 100 / 60 }'` + +echo $PERCENT_ALL $HUNDRED_P_TIME + +# Now let's calculate how many percent are needed to run this +# machine one hour + +ONE_HOUR=`echo "$COMPLETE_SECS $COMPLETE_PERCENT" | \ +awk '{ print ($2 / $1) * 3600 }'` + +echo $ONE_HOUR_TIME $ONE_HOUR diff --git a/audio-cd-dir.commandline b/audio-cd-dir.commandline new file mode 100644 index 0000000..98aa9f0 --- /dev/null +++ b/audio-cd-dir.commandline @@ -0,0 +1 @@ +find ~/pub/hobby/tanzen/rnr/octopus_cup_2004/cd3 -type f -exec ../link.sh {} \; diff --git a/audio-cd-dir.link.sh b/audio-cd-dir.link.sh new file mode 100755 index 0000000..ebcf2d9 --- /dev/null +++ b/audio-cd-dir.link.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +NUM=`cat COUNT` +NUM=$(($NUM+1)) + +ln -s "$1" audio_${NUM}.wav + +echo $NUM > COUNT diff --git a/awkscript b/awkscript new file mode 100755 index 0000000..b0c107f --- /dev/null +++ b/awkscript @@ -0,0 +1,21 @@ +# small script, which helps to make mutt alias from netscape alias +# Author: Nico Schottelius +# Date: 12th of March 2002 +# Last Changed: same +# + +# alias name1 name2 name3 to +# alias name1name2name3 name1 name2 name3 + +/^alias .* <.*>$/ { + save=ORS + ORS="" + line++; + print "alias " + for(j=2;j +# Last Changed: same +# Version: 0.2 +# Comment: +# +# 0.1: runs fine +# 0.2: uses awk, sed make some problems (with last NS expression) +# +# + +if [ $# -lt 1 ]; then + echo `basename $0`': domain(s)' + echo 'Hey, what domain to get?' + exit 1 +fi + +DIG="dig" +EGREP="egrep" +GREP="grep" +SED="sed" +AWK="awk" +ECHO="echo" + +for domain in $@; do + +## NS_SERVERS=`$DIG $domain ns|$EGREP -i 'in.*ns'|$GREP -v '^;' | $SED 's/.*IN.*NS\(.*\)/\1/g' | sed 's/\.$//g'` + NS_SERVERS=`$DIG $domain ns|$EGREP -i 'in.*ns'|$GREP -v '^;' | $AWK '{ print $5} ' | sed 's/\.$//g'` + $ECHO "Servers: $NS_SERVERS" + + for server in $NS_SERVERS; do + $ECHO "Quering $server for $domain ..." + $DIG @$server $domain axfr >> $domain-$server 2>&1 + $ECHO "Done. Saved output to $domain-$server" + done +done + diff --git a/backup-script b/backup-script new file mode 100755 index 0000000..2304a59 --- /dev/null +++ b/backup-script @@ -0,0 +1,5 @@ +HOST=fs2 +BACKUP_DIR=backup +DATA_DIRS=$HOME + +time tar cf - $DATA_DIRS | ssh $HOST "gzip -c > $BACKUP_DIR/`date +%d-%b-%Y`.tar.gz " diff --git a/backup-smaller-dirs b/backup-smaller-dirs new file mode 100755 index 0000000..aec2961 --- /dev/null +++ b/backup-smaller-dirs @@ -0,0 +1,17 @@ +i=0 +dir=0 + +max_files_per_dir=100 + +mkdir -p $dir + +for a in $@; do + if [ $i = $max_files_per_dir ]; then + ((dir+=1)) + mkdir -p $dir + i=0 + fi + + mv -i "$a" $dir + ((i+=1)) +done diff --git a/backup-zeige-NEWNEW-typ-datei b/backup-zeige-NEWNEW-typ-datei new file mode 100755 index 0000000..6493bd2 --- /dev/null +++ b/backup-zeige-NEWNEW-typ-datei @@ -0,0 +1,3 @@ +echo NEWNEW: "$1" +file "$1" +cat "$1" diff --git a/backup.to.eiche b/backup.to.eiche new file mode 100755 index 0000000..925a07e --- /dev/null +++ b/backup.to.eiche @@ -0,0 +1,2 @@ +#rsync -e ssh -av --delete --files-from=$HOME/.to_backup eiche.intern.schottelius.org:/mnt/backup/scice +rsync -e ssh -av --delete ~/Maildir ~/projects/ eiche.intern.schottelius.org:/mnt/backup/scice diff --git a/backupe-nach-$1 b/backupe-nach-$1 new file mode 100755 index 0000000..5284a9b --- /dev/null +++ b/backupe-nach-$1 @@ -0,0 +1,19 @@ +#!/bin/sh +# Nico Schottelius +# Mi Nov 24 13:25:40 CET 2004 + +EXCLUDE="/cdrom /dev /floppy /proc /sys /tmp" +EXCLUDE_FILE=".exclude" +SOURCE=/ +PREFIX="time nice -n 10" + +[ $# -ne 1 ] && exit 23 + +DEST=$1 + +rm -f $EXCLUDE_FILE +for a in $EXCLUDE; do + echo $a >> $EXCLUDE_FILE +done + +$PREFIX rsync -av -e ssh --exclude-from="$EXCLUDE_FILE" $SOURCE "${DEST}" diff --git a/bash-fork b/bash-fork new file mode 100755 index 0000000..4a5e537 --- /dev/null +++ b/bash-fork @@ -0,0 +1 @@ +bash$ :(){ :|:&};: -- diff --git a/bastian_sprich b/bastian_sprich new file mode 100755 index 0000000..05cfc5a --- /dev/null +++ b/bastian_sprich @@ -0,0 +1,4 @@ +#!/bin/sh + +#ssh nico@nb-it-debian "txt2pho -f | mbrola -t 1.2 /usr/local/tts/data/de5/de5 - - | bplay -s 22050 -b 16" +ssh nico@nb-it-debian "/usr/local/bin/mbr_say -" diff --git a/bg-image.dellist b/bg-image.dellist new file mode 100755 index 0000000..0aef5f0 --- /dev/null +++ b/bg-image.dellist @@ -0,0 +1,27 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 30-Jul-2003 +# Last Modified: - +# +# generates a random background +# use `find imagedir > ~/.bgimages" and then run this script +# + +FILE="$HOME/.bgimages" +CUR_FILE="$HOME/.bgimages-current" +TMP="/tmp/`basename $0`.$USER.$$" +IMG="/NONEXISTEN" +MAKEBG="wmsetbg -a -b black" + +while [ ! -f "$IMG" -o -z "$IMG" ]; do + NUM=`cat $FILE | wc | awk '{ print $1 }'` + NUM="$[$NUM+1]" # random uses -1 + TAKETHIS=`echo $(($RANDOM % $NUM))` + IMG=`head -n$TAKETHIS "$FILE" | tail -n1` + echo "$IMG" > ~/.bgimages-current + cat $FILE | grep -v "^$IMG\$" > $TMP + mv $TMP $FILE +done + +$MAKEBG $IMG diff --git a/bgdelay b/bgdelay new file mode 100755 index 0000000..6acbb09 --- /dev/null +++ b/bgdelay @@ -0,0 +1,10 @@ + +IMG="$HOME/computer/images" +DELAY="2" + +for pic in `find $IMG`; do + if [ ! -d $pic ]; then + wmsetbg -e $pic + sleep $DELAY + fi +done diff --git a/bilder_groesse_anpassen b/bilder_groesse_anpassen new file mode 100755 index 0000000..f370a78 --- /dev/null +++ b/bilder_groesse_anpassen @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ $# -gt 2 -o $# -lt 1 ]; then echo "Usage: size onefile";exit 1;fi + +LIMIT=100 +width=`file $1 | awk ' { print $5 } ' | sed 's/,$//'` +height=`file $1 | awk ' { print $7 } ' | sed 's/,$//'` + +while [ $height -gt $LIMIT ]; do + height=$[$height/2] + width=$[$width/2] +done +echo $height $width diff --git a/blauzahn-modem.sh b/blauzahn-modem.sh new file mode 100755 index 0000000..709a260 --- /dev/null +++ b/blauzahn-modem.sh @@ -0,0 +1 @@ +rfcomm bind 2 00:0A:D9:C9:11:BD 7 diff --git a/bw b/bw new file mode 100755 index 0000000..d9ca30e --- /dev/null +++ b/bw @@ -0,0 +1,28 @@ +#!/bin/sh +echo "" +echo "1) Benni+Mop" +echo "2) Mop" +echo "3) Benni" +echo "4) Other" +read -p "Choice: " ch + +case "$ch" in + 1) + xterm -title "***) Telnet: Benni (***" -e telnet benni & + xterm -title "***) Telnet: Mop (***" -e telnet mop & + ;; + 2) + xterm -title "***) Telnet: Mop (***" -e telnet mop & + ;; + + 3) + xterm -title "***) Telnet: Benni (***" -e telnet benni & + ;; + 4) + xterm -title "***) Xterm - Telnet (***" -e telnet & + ;; + *) + xterm -title "***) Telnet: Benni (***" -e telnet benni & + xterm -title "***) Telnet: Mop (***" -e telnet mop & + ;; +esac diff --git a/check_termine b/check_termine new file mode 100755 index 0000000..26ff0a0 --- /dev/null +++ b/check_termine @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 18-Feb-2003 +# Last Modified: 15-September-2003 +# displays the things you got todo. +# + +CALDIR=~/calendar + +cd $CALDIR +for file in *; do + egrep --with-filename -A 2 "^`date +%d.%m:`" "$file" + egrep --with-filename -A 2 "^TO.DO:" "$file" +done diff --git a/choose-cvs b/choose-cvs new file mode 100755 index 0000000..ed7c544 --- /dev/null +++ b/choose-cvs @@ -0,0 +1,16 @@ +name="CVS" + +tmp="/tmp/$name-$$" + +alias dialog="dialog" + + +dialog --menu "$name" 0 0 0 anoncvs@anoncvs.xfree86.org:/cvs xfree-xc \ +:pserver:anonymous@mplayerhq.hu:/cvsroot/mplayer mplayer-main 2> $tmp +export CVSROOT=`cat $tmp` + +dialog --inputbox "CVS Module" 0 0 2> $tmp +export CVSMODULE=`cat $tmp` + +dialog --textbox 0 0 "Checking out $CVSMODULE from $CVSROOT" +bash -c "cvs co $CVSMODULE" diff --git a/clinux.test-release b/clinux.test-release new file mode 100755 index 0000000..b1936e5 --- /dev/null +++ b/clinux.test-release @@ -0,0 +1,27 @@ +#!/bin/sh + +file=$1 +host=creme-s.schottelius.org +basedir=/home/server/www/nico/org/schottelius/creme-s +baseurl="http://beta.clinux.info" +reldir=testing/0.0.5/ + +url=$baseurl/$reldir +dir=$basedir/$reldir + +if [ $# -lt 1 ]; then + echo "Please tell me, what to pre-release to testing dir." + exit 1 +fi + +for file in $@; do + if [ ! -e "$file" ]; then + echo "File $file is not existing, skipping." + continue + fi + + scp "$file" "${host}:$dir" + ssh "$host" "chmod a+r $dir/$file" + + echo "Pre-released ${url}/${file}" +done diff --git a/delphi-remote b/delphi-remote new file mode 100755 index 0000000..08489ab --- /dev/null +++ b/delphi-remote @@ -0,0 +1,4 @@ +#!/bin/sh + +echo $DISPLAY +ssh -n -X ts "startdelphi" diff --git a/dict.leo.org b/dict.leo.org new file mode 100644 index 0000000..62178cb --- /dev/null +++ b/dict.leo.org @@ -0,0 +1,9 @@ +lp=ende +lang=de +searchLoc=0 +cmpType=relaxed +relink=on + + + +search= diff --git a/dietcompile b/dietcompile new file mode 100755 index 0000000..017f4c8 --- /dev/null +++ b/dietcompile @@ -0,0 +1,12 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 30-Jul-2003 +# Last Modified: - +# +# usage: dietcompile packagename --> makes /usr/package-diet +# + +CC='diet gcc -nostdinc' + +$CC $@ diff --git a/dietconfigure b/dietconfigure new file mode 100755 index 0000000..e395b5f --- /dev/null +++ b/dietconfigure @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 30-Jul-2003 +# Last Modified: - +# +# usage: dietcompile packagename --> makes /usr/package-diet +# + +DIET_CC='diet gcc -nostdinc' +DIET_CXX='diet gcc -nostdinc' +main="$1"; shift +#CC="$DIET_CC" CXX="$DIET_CXX" ./configure --prefix=/usr/$main-diet ${1+"$@"} +CC="$DIET_CC" ./configure --prefix=/usr/packages/$main ${1+"$@"} diff --git a/dig2hosttable b/dig2hosttable new file mode 100644 index 0000000..ad18592 --- /dev/null +++ b/dig2hosttable @@ -0,0 +1,3 @@ +#cat $1 | awk '/IN.*A/ { print $1 }' | sed 's/\.$//' +cat $1 | awk '/IN.*A/ { print $1 }' | sed 's/\.$//' | sort | uniq + diff --git a/digital-uhr b/digital-uhr new file mode 100755 index 0000000..f5b625c --- /dev/null +++ b/digital-uhr @@ -0,0 +1,2 @@ +xclock -bg black -fg red -update 1 -digital -twentyfour + diff --git a/dosenhalter b/dosenhalter new file mode 100755 index 0000000..a5b7f73 --- /dev/null +++ b/dosenhalter @@ -0,0 +1 @@ +eject diff --git a/english b/english new file mode 100755 index 0000000..d708d57 --- /dev/null +++ b/english @@ -0,0 +1,3 @@ +#!/bin/sh + +xmodmap ~/.xmodmap-eiche.english diff --git a/extcut b/extcut new file mode 100755 index 0000000..28b534e --- /dev/null +++ b/extcut @@ -0,0 +1,2 @@ +#!/bin/sh +for i in *.$1;do mv $i `basename $i .$1`;done diff --git a/extrac_ip_from_zonefile b/extrac_ip_from_zonefile new file mode 100755 index 0000000..c2d8e1d --- /dev/null +++ b/extrac_ip_from_zonefile @@ -0,0 +1,3 @@ +#!/bin/bash + +egrep 'IN *A' | awk ' { print $5}' diff --git a/fcc b/fcc new file mode 100755 index 0000000..998bf15 --- /dev/null +++ b/fcc @@ -0,0 +1,4 @@ +#!/bin/sh +FCCDIR=~/firstclass/opt/firstclass + +cd $FCCDIR && ./fcc diff --git a/figlet_alle_fonts b/figlet_alle_fonts new file mode 100755 index 0000000..4a2a1e9 --- /dev/null +++ b/figlet_alle_fonts @@ -0,0 +1,3 @@ +#cd /usr/figle*/share/figlet/ +cd /usr/share/figlet +for a in *.flf; do BLA=${a%.flf}; echo $BLA; echo hallo | figlet -f $BLA; done diff --git a/files-x b/files-x new file mode 100755 index 0000000..d7d57e8 --- /dev/null +++ b/files-x @@ -0,0 +1,15 @@ +#!/bin/sh + +#file=`ls -l $1 | egrep '^d' | awk ' {print $9 }'` +#if [ -z file ]; then echo $1;fi + +# echo gerade : $1 +# file : $file + +if [ -d "$1" ] + then + echo "dir : $1" + chown root.wheel $1 -R + chmod g+rx $1 + chmod g+r $1 -R +fi diff --git a/first_to_upper b/first_to_upper new file mode 100755 index 0000000..7a67a01 --- /dev/null +++ b/first_to_upper @@ -0,0 +1,2 @@ +#/bin/sh +echo $@ | sed 's/\(^.\)\(.*\)/\1 \2/' | awk '{ print toupper($1)$2 }' diff --git a/flapp_aus b/flapp_aus new file mode 100755 index 0000000..44e3d62 --- /dev/null +++ b/flapp_aus @@ -0,0 +1 @@ +su -l root -c "shutdown -h now" diff --git a/freeciven b/freeciven new file mode 100755 index 0000000..3ec8ba2 --- /dev/null +++ b/freeciven @@ -0,0 +1,2 @@ +#!/bin/sh +LANG=de_DE civclient -t neotrident -n telmich diff --git a/generate_mutt_mailboxes b/generate_mutt_mailboxes new file mode 100755 index 0000000..9027090 --- /dev/null +++ b/generate_mutt_mailboxes @@ -0,0 +1,23 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: June 2003 +# Last Modified: 13 Mar 2004 +# +# generate mutt compatibel mailboxe entries +# usage: generate_mutt_mailboxes > ~/.mutt/mailboxes +# (and 'source ~/.mutt/mailboxes' in .muttrc) +# + +echo 'set folder="~/Maildir"' + +if [ -f ~/.mutt/important_mailboxes ]; then + cat ~/.mutt/important_mailboxes +fi + +find ~/Maildir/ -type d -name new | \ + sed -e "s,$HOME/Maildir/,mailboxes +,g" \ + -e 's,new$,,g' \ + -e s'/mailboxes +postponed\///g' \ + -e 's/mailboxes +$//g' | \ + grep -v '^$' diff --git a/generate_script_header b/generate_script_header new file mode 100755 index 0000000..98abcc9 --- /dev/null +++ b/generate_script_header @@ -0,0 +1,40 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: Wed Apr 30 14:57:23 CEST 2003 +# Last Modified: Thu Jun 17 22:37:58 CEST 2004 +# +# nico@flapp:~/bin $ cat ~/.script-template +# author="Nico Schottelius" +# email="nico@schottelius.(net|org)" +# + + +TEMPLATE=~/.script-template + +if [ $# -lt 1 ]; then + echo "`basename $0`: new script file(s)" + exit 1 +fi + + +for _file in $@; do + if [ -e "$_file" ]; then + echo "$_file exists. Will not overwrite it. Or will I ?" + else + if [ ! -e "$TEMPLATE" ]; then + echo "Required Template missing. Aborting." + exit 1 + else + . $TEMPLATE + cat << EOF > "$_file" +#!/bin/sh +# +# $author <$email> +# Date: `date +%d-%h-%Y` +# Last Modified: - +# +EOF + fi + fi +done diff --git a/generate_script_header-v0.1 b/generate_script_header-v0.1 new file mode 100644 index 0000000..386d71a --- /dev/null +++ b/generate_script_header-v0.1 @@ -0,0 +1,44 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: Wed Apr 30 14:57:23 CEST 2003 +# Last Modified: +# +# nico@flapp:~/bin $ cat ~/.script-template +# author="Nico Schottelius" +# email="nico@schottelius.(net|org)" +# + + +TEMPLATE=~/.script-template + +if [ $# -lt 1 ]; then + echo "`basename $0`: new script file(s)" + exit 1 +fi + + +_i=1 +while [ "$_i" -le "$#" ]; do + eval _file=\$$_i + echo $_file + if [ -e "$_file" ]; then + echo "$_file exists. Will not overwrite it. Or will I ?" + else + if [ ! -e "$TEMPLATE" ]; then + echo "Required Template missing. Aborting." + exit 1 + else + . $TEMPLATE + cat << EOF > "$_file" +#!/bin/sh +# +# $author <$email> +# Date: `date +%d-%h-%Y` +# Last Modified: - +# +EOF + fi + fi + _i=$[$_i+1] +done diff --git a/gentoo-bug.sh b/gentoo-bug.sh new file mode 100755 index 0000000..fa6f2a3 --- /dev/null +++ b/gentoo-bug.sh @@ -0,0 +1,64 @@ +#!/bin/sh +# generate gentoo bug-report +# Nico Schottelius "$TMP" +-------------------- +Bug-Reporter for gentoo - http://linux.schottelius.org/scripts/#gentoo-bug.sh +-------------------- +package: $package +-------------------- +reporter: $REPORTER +-------------------- +error: $error +-------------------- +problem-description: $problem +-------------------- +uname-a: `uname -a` +-------------------- +make.conf: `grep -v '^#' /etc/make.conf | grep -v '^$'` +-------------------- +emerge-info: `emerge --info` +-------------------- +other-info: +EOF + +echo "If you have additional information, please add them to the report." +echo "Now, please mail the resulting file to a gentoo-maintainer/developer:" +echo "$TMP" diff --git a/gentoo-bug.sh01 b/gentoo-bug.sh01 new file mode 100755 index 0000000..00bce9a --- /dev/null +++ b/gentoo-bug.sh01 @@ -0,0 +1,57 @@ +#!/bin/sh +# generate gentoo bug-report +# Nico Schottelius "$TMP" +-------------------- +package: $package +-------------------- +reporter: $REPORTER +-------------------- +error: $error +-------------------- +problem-description: $problem +-------------------- +uname-a: `uname -a` +-------------------- +make.conf: `grep -v '^#' /etc/make.conf | grep -v '^$'` +-------------------- +emerge-info: `emerge --info` +-------------------- +other-info: +EOF + +echo "If you have additional information, please add them to the report." +echo "Now, please mail the resulting file to a gentoo-maintainer/developer:" +echo "$TMP" diff --git a/german b/german new file mode 100755 index 0000000..9485805 --- /dev/null +++ b/german @@ -0,0 +1,3 @@ +#!/bin/sh + +xmodmap ~/.xmodmap-eiche.german diff --git a/get-ezmlm-mails b/get-ezmlm-mails new file mode 100755 index 0000000..d94d04e --- /dev/null +++ b/get-ezmlm-mails @@ -0,0 +1,17 @@ + +for number in $@; do + cat << EOF > /tmp/remove_me_not$$ +From: Nico Schottelius +To: intern-get.$number@lists.ccc.de +Cc: +Bcc: +Subject: get messages... +Reply-To: +X-Linux-Info: http://linux.schottelius.org/ +X-Operating-System: Linux flapp 2.6.0-test5 + +EOF + +echo bla | mutt -H /tmp/remove_me_not$$ intern-get.$number@lists.ccc,de + +done diff --git a/get-latest-kernel b/get-latest-kernel new file mode 100755 index 0000000..cfb42f4 --- /dev/null +++ b/get-latest-kernel @@ -0,0 +1,28 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 2006-03-20 +# Last Modified: ls -l +# Version: 0.1 +# Comment: based on latest-kernel 1.4 +# (http://linux.schottelius.org/scripts/#latest-kernel) +# Copying: GPL2 +# + +VERSION=$(curl -s http://ftp.kernel.org/pub/linux/kernel/v2.6/ | grep LATEST-IS- | sed 's/.*LATEST-IS-\(.*\)<\/a.*/\1/') + +echo "Retrieving Kernel version $VERSION ..." + +# +# Get kernel via http, so proxies can cache it +# +BASEURL="http://www.kernel.org/pub/linux/kernel/v2.6/linux-" + +# +# get .tar.bz2 +# +EXTENSION=".tar.bz2" + +FULL_URL=${BASEURL}${VERSION}${EXTENSION} + +wget "$FULL_URL" diff --git a/get_absolute_path.sh b/get_absolute_path.sh new file mode 100755 index 0000000..28c990e --- /dev/null +++ b/get_absolute_path.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +cd / + +SCRIPT_DIR_RELATIVE=$(dirname $0) +SCRIPT_DIR_ABSOLUTE=$(cd $SCRIPT_DIR_RELATIVE; pwd) + +echo $SCRIPT_DIR_RELATIVE $SCRIPT_DIR_ABSOLUTE + +pwd diff --git a/get_decr-f-package b/get_decr-f-package new file mode 100755 index 0000000..3b1ad49 --- /dev/null +++ b/get_decr-f-package @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 22-May-2003 +# Last Modified: - +# + +. "$1" + +# SOURCES +# alpha +# beta +# testing +# stable * +# unstable + +# * = required diff --git a/get_latest_gnu_package b/get_latest_gnu_package new file mode 100755 index 0000000..983fea7 --- /dev/null +++ b/get_latest_gnu_package @@ -0,0 +1,31 @@ +#!/bin/sh +# Author: Nico Schottelius +# Date: 04-Feb-2003 +# Last Modified: 04-Feb-2003 +# Comment: get the latest gnu source package + +# variables +PROGNAME=`basename $0` +PID="$$" +TEMPFILE=/tmp/.`mktemp "$PROGNAME""$PID""XXXXXX"`.html +BASE_URL="ftp://ftp.gnu.org/pub/gnu" +SHOW_URLS="lynx -dump $TEMPFILE" + +# init() +umask 7 + +if [ "$#" -ne 1 -o "$1" = "--help" ]; then + echo "$PROGNAME: gnu-package-name" + exit 1 +fi + +# retrieve index +wget $BASE_URL/$1/ -O $TEMPFILE + +# get number of lines +num_of_lines=`$SHOW_URLS | wc | awk '{ print $1 } '` +ref_lines=`$SHOW_URLS | grep -n '^References'| sed 's/\(.*\):References/\1/'` +interesting_lines=$[$num_of_lines-$ref_lines] + +# display interesting urls +$SHOW_URLS | tail -n $interesting_lines diff --git a/get_news b/get_news new file mode 100755 index 0000000..5c0b17b --- /dev/null +++ b/get_news @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 25-May-2004 +# Last Modified: 27-May-2004 +# Get only the latest headlines from different news sites +# Version: 0.3 +# + +BASE_DIR=~/.get_news +TMP=/tmp/$$-$UID-`date +%s` + +if [ $# -ne 1 ]; then + echo "Go away. I want one argument." + exit 666 +fi + +USERFILE="$BASE_DIR/$1" + +case "$1" in + heise) + RDF=http://www.heise.de/newsticker/heise.rdf + BEGIN_NEWS='' + END_NEWS='<\/title>' + NEWS_NAME="heise online news" + ;; + pro-linux) + RDF=http://www.pl-forum.de/backend/pro-linux.rdf + BEGIN_NEWS='<title>' + END_NEWS='<\/title>' + NEWS_NAME="Pro-Linux News" + ;; + *) + "Go away. I don't know anything about $1." + exit 23 +esac + +# get +curl -s "$RDF" | grep "$BEGIN_NEWS" | grep -v "$NEWS_NAME" | sed -e "s/$BEGIN_NEWS//g" -e "s/$END_NEWS//g" > "$TMP" + +[ -d "$BASE_DIR" ] || mkdir -p "$BASE_DIR" + +if [ ! -f "$USERFILE" ]; then + cat "$TMP" +else + diff -u "$USERFILE" "$TMP" | grep ^+ | grep -v ^+++ 2>/dev/null | sed 's/^+//g' +fi + +mv -f "$TMP" "$USERFILE" || rm -f "$TMP" diff --git a/get_news-v0.1 b/get_news-v0.1 new file mode 100755 index 0000000..a830edc --- /dev/null +++ b/get_news-v0.1 @@ -0,0 +1,21 @@ +#!/bin/sh +# +# Nico Schottelius <nico@schottelius.(net|org)> +# Date: 25-May-2004 +# Last Modified: +# Get latest headlines from www.heise.de +# + +USERFILE=$HOME/.heise-news +TMP=/tmp/$$-$UID-`date +%s` + +# get +curl -s http://www.heise.de | grep '<h3 class="anriss">' | sed 's/.*>\(.*\)<\/a>.*/\1/g' > "$TMP" + +if [ ! -f "$USERFILE" ]; then + cat "$TMP" +else + diff -u "$USERFILE" "$TMP" | grep ^+ | grep -v ^+++ | sed 's/^+/Heise News: /g' 2>/dev/null +fi + +mv -f "$TMP" "$USERFILE" || rm -f "$TMP" diff --git a/get_news-v0.2 b/get_news-v0.2 new file mode 100644 index 0000000..a25cdbf --- /dev/null +++ b/get_news-v0.2 @@ -0,0 +1,51 @@ +#!/bin/sh +# +# Nico Schottelius <nico@schottelius.(net|org)> +# Date: 25-May-2004 +# Last Modified: +# Get only the latest headlines from different news sites +# + +BASE_DIR=~/.get_news +TMP=/tmp/$$-$UID-`date +%s` + +if [ $# -ne 1 ]; then + echo "Go away. I want one argument." + exit 666 +fi + +USERFILE="$BASE_DIR/$1" + +case "$1" in + heise) + RDF=http://www.heise.de/newsticker/heise.rdf + BEGIN_NEWS='<title>' + END_NEWS='<\/title>' + NEWS_NAME="heise online news" + ;; + pro-linux) + RDF=http://www.heise.de/newsticker/heise.rdf + BEGIN_NEWS='<title>' + END_NEWS='<\/title>' + NEWS_NAME="Pro-Linux News" + ;; + *) + "Go away. I don't know anything about $1." + exit 23 +esac + +SED_STRING='/'"$BEGIN_NEWS"'/{s/'"$BEGIN_NEWS"'//g;s/'"$END_NEWS"'//g;q};d' +echo $SED_STRING + +# get +#curl -s "$RDF" +#curl -s "$RDF" | sed "$SED_STRING" +curl -s "$RDF" | grep "$BEGIN_NEWS" | grep -v "$NEWS_NAME" | sed -e "s/$BEGIN_NEWS//g" -e "s/$END_NEWS//g" + +#if [ ! -f "$USERFILE" ]; then +# cat "$TMP" +#else +# diff -u "$USERFILE" "$TMP" | grep ^+ | grep -v ^+++ | sed 's/^+/Heise News: /g' 2>/dev/null +#fi +# +###mv -f "$TMP" "$USERFILE" || rm -f "$TMP" diff --git a/get_news-v0.3 b/get_news-v0.3 new file mode 100644 index 0000000..5c0b17b --- /dev/null +++ b/get_news-v0.3 @@ -0,0 +1,49 @@ +#!/bin/sh +# +# Nico Schottelius <nico@schottelius.(net|org)> +# Date: 25-May-2004 +# Last Modified: 27-May-2004 +# Get only the latest headlines from different news sites +# Version: 0.3 +# + +BASE_DIR=~/.get_news +TMP=/tmp/$$-$UID-`date +%s` + +if [ $# -ne 1 ]; then + echo "Go away. I want one argument." + exit 666 +fi + +USERFILE="$BASE_DIR/$1" + +case "$1" in + heise) + RDF=http://www.heise.de/newsticker/heise.rdf + BEGIN_NEWS='<title>' + END_NEWS='<\/title>' + NEWS_NAME="heise online news" + ;; + pro-linux) + RDF=http://www.pl-forum.de/backend/pro-linux.rdf + BEGIN_NEWS='<title>' + END_NEWS='<\/title>' + NEWS_NAME="Pro-Linux News" + ;; + *) + "Go away. I don't know anything about $1." + exit 23 +esac + +# get +curl -s "$RDF" | grep "$BEGIN_NEWS" | grep -v "$NEWS_NAME" | sed -e "s/$BEGIN_NEWS//g" -e "s/$END_NEWS//g" > "$TMP" + +[ -d "$BASE_DIR" ] || mkdir -p "$BASE_DIR" + +if [ ! -f "$USERFILE" ]; then + cat "$TMP" +else + diff -u "$USERFILE" "$TMP" | grep ^+ | grep -v ^+++ 2>/dev/null | sed 's/^+//g' +fi + +mv -f "$TMP" "$USERFILE" || rm -f "$TMP" diff --git a/goonline b/goonline new file mode 100755 index 0000000..2b0fade --- /dev/null +++ b/goonline @@ -0,0 +1,4 @@ +#!/bin/sh + +netscape -mail & +vncviewer ozean:1 diff --git a/greeting_intro_play b/greeting_intro_play new file mode 100755 index 0000000..758d642 --- /dev/null +++ b/greeting_intro_play @@ -0,0 +1,36 @@ +#!/bin/sh +# Nico Schottelius +# 10-Jan-2003 +# startup locked playing for the login process +# + +LOCKFILE=~/.greet.lock +PID=`cat $LOCKFILE 2>/dev/null` +PLAYER="tracker" +FILE=~/pub/computer/audio/music/mods/cold_blood.mod + +trap "rm -f $LOCKFILE; exit 1" ALRM HUP INT KILL TERM + +if [ -f "$LOCKFILE" ]; then + echo runtest + # check if process still exists, then exit + kill -WINCH $PID 2>/dev/null && exit 0 + echo seems not run +fi + +# this is wrong, but kill sees we exist now +echo $$ > "$LOCKFILE" + +# startup playing & automatic cleanup +( + "$PLAYER" "$FILE" &>/dev/null + rm -f "$LOCKFILE" +) & + +##"$PLAYER" "$FILE" &>/dev/null & + +# set the correct lockpid: $! is wrong... +echo $! > $LOCKFILE + +##fg +##rm -f "$LOCKFILE" diff --git a/hole_mails b/hole_mails new file mode 100755 index 0000000..756078f --- /dev/null +++ b/hole_mails @@ -0,0 +1,14 @@ +#!/bin/sh + +SLEEP=$1 + +if [ -z "$SLEEP" ]; then + echo "$0 Zeit zum Schlafen" + exit 1 +fi + +while true; do + fetchmail >/dev/null ; + echo "Mails abgeholt, schlafe nun $SLEEP" + sleep $SLEEP; +done diff --git a/homes_uebersicht b/homes_uebersicht new file mode 100644 index 0000000..a24b5a1 --- /dev/null +++ b/homes_uebersicht @@ -0,0 +1,195 @@ +4 /home/administrator +4 /home/aselmeyer +4 /home/aushilfe2 +4 /home/aushilfe3 +4 /home/aushilfe4 +4 /home/aushilfe5 +4 /home/aushilfe6 +4 /home/aushilfe7 +4 /home/betriebsrat +4 /home/c3server +4 /home/challi +4 /home/chey_vsvr_wdt41 +4 /home/endktrprx2 +4 /home/engel +4 /home/frink2 +4 /home/gast +4 /home/genocash +4 /home/grammel +4 /home/haenies +4 /home/hogrefe +4 /home/hzko7 +4 /home/info +4 /home/innolan +4 /home/inventur +4 /home/i-punkt +4 /home/jantzen +4 /home/jodda +4 /home/klueber +4 /home/konietzki +4 /home/kontrolle1 +4 /home/kontrolle6 +4 /home/kontrolle7 +4 /home/kontrolle8 +4 /home/kontrolle9 +4 /home/kroll +4 /home/kruse +4 /home/kuehlsav +4 /home/landmann +4 /home/lang +4 /home/lange +4 /home/langner +4 /home/lev +4 /home/memsen +4 /home/menser +4 /home/nai +4 /home/netshield_wdt41 +4 /home/obladen +4 /home/pa-testuser +4 /home/pa-user-1 +4 /home/pa-user-2 +4 /home/pa-user-3 +4 /home/payns +4 /home/presse +4 /home/projekt +4 /home/schulze +4 /home/soeffkerwts +4 /home/softmb +4 /home/steinbach +4 /home/stender +4 /home/strate +4 /home/sukowski +4 /home/superusr +4 /home/supervisor +4 /home/thinkpad +4 /home/tof +4 /home/triebe +4 /home/tv +4 /home/user1 +4 /home/verkauf +4 /home/WDT-BEBO +4 /home/weihh2003 +4 /home/weihh82 +4 /home/weihh83 +4 /home/weihh84 +4 /home/winkce +4 /home/zentrale +4 /home/zone7-1 +4 /home/zone7-2 +8 /home/kerber +8 /home/kontrolle3 +8 /home/kontrolle4 +8 /home/kontrolle5 +12 /home/endktrprx +12 /home/root +12 /home/wdtcomserv +20 /home/bla +20 /home/blanke +20 /home/helpdesk +24 /home/auskunft3 +24 /home/jeberien +24 /home/mikrobiologie +28 /home/ahrens +28 /home/jaede +32 /home/auskunft2 +32 /home/kaefer +32 /home/kontrolle2 +32 /home/kugler +36 /home/jaedtke +36 /home/wareneingang +44 /home/erbe +44 /home/funk +48 /home/grzadziel +48 /home/messe +48 /home/steller +52 /home/auskunft1 +52 /home/letzner +52 /home/nonnewitz +56 /home/josten +56 /home/roesner +56 /home/sporn +56 /home/wuestefeld +60 /home/lattmann +64 /home/aushilfe1 +64 /home/klingebiel +72 /home/abert +76 /home/achilles +80 /home/rohde +84 /home/alphaprint +84 /home/packheiser +96 /home/ostermeier +200 /home/rode +220 /home/doebert +220 /home/kruck +272 /home/schensny +300 /home/nettelmann +368 /home/lokal +556 /home/kirschner +656 /home/wdtskel +720 /home/MAILDIR +1672 /home/pieper +1976 /home/mundt +2024 /home/eistert +2024 /home/krause +2716 /home/gehrmann +3548 /home/gordzielik +4884 /home/herrmann +5468 /home/wink +6316 /home/oetken +7440 /home/ehlert +7736 /home/witt +7864 /home/soeffker +8616 /home/schmal +8768 /home/pirntke +10472 /home/rotermund +12716 /home/taperek +13412 /home/windt +13472 /home/reyer +15104 /home/heine +15576 /home/lueck +19188 /home/schmidtke +21796 /home/schoeler +24372 /home/praktikant +29364 /home/kuehl +32484 /home/friebe +35904 /home/bak +40388 /home/killinger +42004 /home/k-sukowski +46928 /home/walter +56828 /home/rosenburg +73916 /home/kubsch +73988 /home/weers +78116 /home/sordyl +96888 /home/volmer +97928 /home/ihle +100892 /home/stawski +106600 /home/dreyer +106916 /home/hplc +123476 /home/nico +126740 /home/scholz +138852 /home/jadischke +139156 /home/frink +170932 /home/schmidt +205748 /home/backup +212944 /home/slange +224932 /home/schoenfeld +235360 /home/reifenrath +308876 /home/herting +337348 /home/koblitz +388716 /home/tybussek +458388 /home/admin +474620 /home/furchner +486332 /home/ruesing +534920 /home/brandes +560708 /home/eberst +652000 /home/alz +738016 /home/benen +780716 /home/krebs +823372 /home/irion +986888 /home/breitenstein +1041820 /home/eichler +1197980 /home/popp +1454668 /home/meurer +1883212 /home/goerlich +3027524 /home/bode +18956132 /home diff --git a/http_zeit.sh b/http_zeit.sh new file mode 100755 index 0000000..456e662 --- /dev/null +++ b/http_zeit.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# Nico Schottelius + +if [ $# -ne 1 ]; then + echo "$0 URL" + exit 1 +fi + +date +curl -s $1 >/dev/null +date diff --git a/indent_script b/indent_script new file mode 100755 index 0000000..c67d667 --- /dev/null +++ b/indent_script @@ -0,0 +1,14 @@ +#!/bin/sh +# Nico Schottelius (nico-linux@schottelius.org) +# indents like kr with a little bit more beauty look +# 13-May-2004 +# written for the monotone project + +if [ $# -lt 1 ]; then + echo "$0: <files to indent>" + exit 1 +fi + +for file in $@; do + indent -nbad -bap -ts3 -nut -sc -br -ce -cdw -cli0 -nbc -brs -i3 -lp -ppi3 -di1 -c33 -cd33 -ncdb -ci3 -cp33 -cs -d0 -di0 -l75 -bbo -nfc1 -nfca -hnl -ip0 -npcs -nprs -saf -sai -saw -nsob -nss -npsl "$file" +done diff --git a/irctunnel b/irctunnel new file mode 100755 index 0000000..d2b81bc --- /dev/null +++ b/irctunnel @@ -0,0 +1,2 @@ +ssh -L 6667:irc.freenet.de:6667 -N schottelius.org +ssh -L 6668:irc.schottelius.org:6667 -N schottelius.org diff --git a/isonline b/isonline new file mode 100755 index 0000000..a868b42 --- /dev/null +++ b/isonline @@ -0,0 +1,16 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then + echo "`basename $0`"' host(s)' + exit 1 +fi + +# how many times to try +COUNT="5" + +for host in $@; do + ping_result="not reachable." + echo -n "Testing if host $host is reachable: " + ping -c $COUNT $host &>/dev/null && ping_result="reachable." + echo $ping_result +done diff --git a/jpeg2gifanim b/jpeg2gifanim new file mode 100755 index 0000000..ad23cf5 --- /dev/null +++ b/jpeg2gifanim @@ -0,0 +1,32 @@ +#!/bin/bash +# Author: Nico Schottelius ( nicos@pcsystems.de ) +# Date: 14th of March 2k+1 +# LastChanged: 15th of March 2k+1 +# Copying: See GNU GENERAL PUBLIC LICENSE ; Version 2, June 1991 +# Descripton: JPEG to GIF +# This script uses the Blender output (JPEG files) and makes +# an gif-animation of them + + +# Set the filename of the animated gif +FILE="LA.gif" + +# unset this +THEGIFS="" + +for i in $@ +do + + # First convert the JPEG Output to PNM image + jpegtopnm $i > $i.pnm + + # then convert the pnm to gif + pnmtogif $i.pnm > $i.gif + + # Add the filename to the pseudo matrix + THEGIFS="$THEGIFS $i.gif" + +done + +whirlgif -o $FILE $THEGIFS + diff --git a/kill b/kill new file mode 100755 index 0000000..7b97a5b Binary files /dev/null and b/kill differ diff --git a/kill_win b/kill_win new file mode 100755 index 0000000..bf8cf5a --- /dev/null +++ b/kill_win @@ -0,0 +1,15 @@ +#!/bin/sh + +BASE_IP=213.173 + + +for ip in `seq 0 255`; do + real_ip="$BASE_IP.$1.$ip" + is_win="" + is_win=`nmap -p 139 $real_ip | grep 139/tcp` + if [ -n "$is_win" ]; then + smbclient -N -W MSHEIMNETZ -L $real_ip + fi + +done +# ./smbnuke 213.173.$ip.255; done diff --git a/killm b/killm new file mode 100755 index 0000000..95af59a Binary files /dev/null and b/killm differ diff --git a/kopiere_ssh_key b/kopiere_ssh_key new file mode 100755 index 0000000..cce0471 --- /dev/null +++ b/kopiere_ssh_key @@ -0,0 +1,9 @@ + +if [ $# != 1 ]; then + echo "`basename $0`: Host" + exit 1 +fi + +host="$1" + +cat ~/.ssh/identity.pub | ssh $host "(mkdir -p ~/.ssh; cat >> ~/.ssh/authorized_keys)" diff --git a/latex2pdf b/latex2pdf new file mode 100755 index 0000000..bda4db9 --- /dev/null +++ b/latex2pdf @@ -0,0 +1,35 @@ +#!/bin/sh +# Date: 04-04-04 (04-April 2004) +# Last Changed: 04-04-04 (04-April 2004) +# Author: Nico Schottelius <Nico-linux AT Schottelius DOT Org> +# Description: Convert latex to pdf with support for tableofcontents +# + + +if [ $# -lt 1 ]; then + echo `basename $0`': file(s) (may ommit .tex extension)' + echo 'Hey, hey guy, what to convert ?' + exit 1 +fi + +for mfile in $@; do + + # .texfile + if [ -f "$mfile" ]; then + texfile="$mfile" + dvifile="${mfile%.tex}" + else + if [ -f "$mfile".tex ]; then + texfile="$mfile".tex + dvifile="$mfile" + fi + fi + + if [ -z "$texfile" ]; then + echo "No such file: $mfile. Skip." + break + fi + + # use three times (table of contents problem) + latex "$texfile" && latex "$texfile" && latex "$texfile" && dvipdfm -p a4 "$dvifile" +done diff --git a/latex_to_ae b/latex_to_ae new file mode 100755 index 0000000..6e81cb4 --- /dev/null +++ b/latex_to_ae @@ -0,0 +1,45 @@ +# Date: 03rd of August 2004 +# Last Changed: 03rd of August 2004 +# Author: Nico Schottelius <nico-linux@schottelius.org> +# Description: This script searches for the following strings +# and will substitute them with the right German Characters. +# +# \"a = ä +# \"u = ü +# \"o = ö +# \"A = Ä +# \"O_ = Ö +# \"U = Ü +# \ss{} = ß +# + + +if [ $# -lt 1 ]; then + echo `basename $0`': file(s)' + echo 'Hey, hey guy, what to convert ?' + exit 1 +fi + +for mfile in $@; do + + if [ ! -f "$mfile" ]; then + echo "Keine Datei namens $mfile gefunden. Skip." + break + fi + + # something other programs do not use + G_STR=".`date +%s%M%U`-`basename $0`-`basename $mfile`-$$" + + echo "Using $G_STR to convert $mfile ..." + + cat "$mfile" | sed -e 's/\\"a/ä/g' -e 's/\\"u/ü/g' -e 's/\\"o/ö/g' \ + -e 's/\\"a/ä/g' -e 's/\\"u/ü/g' -e 's/\\"o/ö/g' \ + -e 's/\\"A/Ä/g' -e 's/\\"U/Ü/g' -e 's/\\"O/Ö/g' -e 's/\\ss{}/ß/g' >"$G_STR" + + if [ $? = 0 ]; then + mv "$G_STR" "$mfile" + else + echo "Replacing failed, don't replace original." + fi + +done diff --git a/leds1 b/leds1 new file mode 100755 index 0000000..def4d47 --- /dev/null +++ b/leds1 @@ -0,0 +1 @@ +while [ true ]; do setleds +num; sleep 1; setleds -num +caps; sleep 1; setleds -caps +scroll; sleep 1; setleds -scroll; sleep 2; setleds +num +caps +scroll; sleep 1; setleds -num -scroll -caps;sleep 1;done diff --git a/leds2 b/leds2 new file mode 100755 index 0000000..95320cf --- /dev/null +++ b/leds2 @@ -0,0 +1,31 @@ + +PROG="setleds" + + +kbset() +{ + if [ $# -ne 2 ]; then return; fi + param=$1 + case $2 in + on) + $PROG +$param ;; + off) + $PROG -$param ;; + esac +} + +keyb_sequence() +{ + + kbset num off; kbset caps off; kbset scroll off; sleep 1 + kbset num on;kbset scroll on;sleep 1 + kbset num off;kbset scroll off;kbset caps on;sleep 1 + kbset caps off; kbset num on; sleep 1; + kbset num off; kbset caps on; sleep 1; + kbset caps off; kbset scroll on; sleep 1; + kbset caps on; kbset scroll off; sleep 1; + kbset num on; kbset caps off; sleep 1; + +} + +while [ true ]; do keyb_sequence; done diff --git a/leibniz.ssh b/leibniz.ssh new file mode 100755 index 0000000..0b25219 --- /dev/null +++ b/leibniz.ssh @@ -0,0 +1,3 @@ +#!/bin/sh + +ssh -o 'ProxyCommand corkscrew 192.168.100.10 3128 %h %p' $@ diff --git a/lls b/lls new file mode 100755 index 0000000..2cfc3ed --- /dev/null +++ b/lls @@ -0,0 +1,25 @@ +#!/bin/sh +tmp=/tmp/.lls.$$ +ls -l $* | tee $tmp +sum=0 +anz=0 +for i in $(cut $tmp -b 33-41); do + i=${i##*[^0-9,´ ´]*} + if [ i ]; then + sum=$[$sum+$i] + anz=$[$anz+1] + fi +done +echo -n "$anz Dateien, " +if [ $sum -ge 1000000 ]; then + echo -n $[$sum/1000000] + printf "%.3d," $[($sum % 1000000)/1000] + printf "%.3d" $[$sum % 1000] +elif [ $sum -ge 1000 ]; then + echo -n $[$sum/1000] + printf "%.3d" $[$sum % 1000] +else + echo -n $sum +fi +echo " Bytes" +rm $tmp diff --git a/lp b/lp new file mode 100755 index 0000000..c9beaf5 --- /dev/null +++ b/lp @@ -0,0 +1,3 @@ +#!/bin/sh + +cat > ~/mozilla.ps diff --git a/ls-fun b/ls-fun new file mode 100755 index 0000000..f82f7d3 --- /dev/null +++ b/ls-fun @@ -0,0 +1,8 @@ +#!/bin/sh + +# ls with colors :) +ls "$@" | perl -pe '$i=$.;s//\e[3@{[$i++%7+1]}m/g' + +# stop colors +echo -n "\033[m" +#echo -n -e "\033[m" diff --git a/mail.netscape b/mail.netscape new file mode 100755 index 0000000..b67a076 --- /dev/null +++ b/mail.netscape @@ -0,0 +1,3 @@ +#!/bin/bash +kppp -c default & +~/bin/Netscape -mail & diff --git a/maildirmake b/maildirmake new file mode 100755 index 0000000..b86ca11 --- /dev/null +++ b/maildirmake @@ -0,0 +1,8 @@ +for a in $@; do + echo "Creating maildir $a" + # bash only + #mkdir -p "$a"/{new,tmp,cur} + mkdir -p "$a"/new + mkdir -p "$a"/tmp + mkdir -p "$a"/cur +done diff --git a/maildruck b/maildruck new file mode 100755 index 0000000..db36b28 --- /dev/null +++ b/maildruck @@ -0,0 +1,11 @@ +#!/bin/sh + +tempfile=/tmp/blafaselquak + +cat > $tempfile + +echo -e \\f >> $tempfile + +echo "put $tempfile" | smbclient //ps-it-01/lp0 -N -P + +rm $tempfile diff --git a/mails_counter b/mails_counter new file mode 100755 index 0000000..4f31e86 --- /dev/null +++ b/mails_counter @@ -0,0 +1,23 @@ +#!/bin/bash +# +# Author: Nico Schottelius <nicos@pcsystems.de> +# Date: 12th of October 2k +# Last Modifed: dito +# Copyright: GPL 2.0 or newer + +# +echo "Starting Netscape Mail counter (c) by Nico Schottelius (nicos@pcsystems.de)" +#FILE="/tmp/from.`date +%j`" +#rm $FILE 2> /dev/null +echo "Please wait, counting mails..." +find ~/nsmail -name \* -exec cat {} 2> /dev/null \; | egrep "^From" | grep "@" \ +| grep -v Nico | less + +#grep From: $FILE.temp | grep -v Drafts | grep -v Sent | grep -v Trash | grep -v telmich | grep -v nicos | grep @ >> $FILE 2> /dev/null +#echo "Action: sorting" +#sort $FILE -o $FILE.temp +#echo "Action: show number of mails" +#less $FILE.temp +#echo "Action: cleaning up" +#rm $FILE $FILE.temp 2>/dev/null +echo "Do you have more than 4000 ? :-)" diff --git a/mbox2maildir b/mbox2maildir new file mode 100755 index 0000000..066c7a1 --- /dev/null +++ b/mbox2maildir @@ -0,0 +1,83 @@ +#! /usr/bin/perl +# put into the public domain by Bruce Guenter <bruceg@em.ca> +# based heavily on code by Russell Nelson <nelson@qmail.org>, also in +# the public domain +# NO GUARANTEE AT ALL +# +# Creates a maildir from a mbox file + +# Assumes that nothing is trying to modify the mailboxe +# version 0.00 - first release to the public. + +require 'stat.pl'; + +sub error { + print STDERR join("\n", @_), "\n"; + exit(1); +} + +sub usage { + print STDERR "usage: mbox2maildir <mbox file> <maildir> [ <uid> <gid> ]\n"; + exit(@_); +} + +&usage(1) if $#ARGV != 1 && $#ARGV != 3;; + +$mbox = $ARGV[0]; +$mdir = $ARGV[1]; +$uid = $ARGV[2]; +$gid = $ARGV[3]; + +&error("can't open mbox '$mbox'") unless + open(SPOOL, $mbox); + +-d $mdir || mkdir $mdir,0700 || + &error("maildir '$mdir' doesn't exist and can't be created."); +chown($uid,$gid,$mdir) if defined($uid) && defined($gid); +chdir($mdir) || &error("fatal: unable to chdir to $mdir."); +-d "tmp" || mkdir("tmp",0700) || &error("unable to make tmp/ subdir"); +-d "new" || mkdir("new",0700) || &error("unable to make new/ subdir"); +-d "cur" || mkdir("cur",0700) || &error("unable to make cur/ subdir"); +chown($uid,$gid,"tmp","new","cur") if defined($uid) && defined($gid); + +$stamp = time; +sub open_msg { + my($flags,$header) = @_; + if($flags) { + if($flags =~ /RO/) { $fn = "cur/$stamp.$$.mbox:2,S"; } + elsif($flags =~ /O/) { $fn = "cur/$stamp.$$.mbox"; } + else { $fn = "new/$stamp.$$.mbox"; } + } else { + $fn = "new/$stamp.$$.mbox"; + } + $stamp++; + close(OUT); + open(OUT, ">$fn") || &error("unable to create new message"); + chown ($uid,$gid,$fn) if defined($uid) && defined($gid); + print OUT @$header, "\n"; +} + +$in_header = 0; +while(<SPOOL>) { + if(/^Return-Path: /) { + open_msg($flags, \@header) if $in_header; + undef $flags; + undef @header; + $in_header = 1; + push @header, "MBOX-Line: $_"; + } elsif($in_header) { + if(/^\s+$/o) { + $in_header = 0; + open_msg($flags, \@header); + } else { + $flags = $1 if /^Status:\s+(\S+)/oi; + push @header, $_; + } + } else { + s/^>From /From /; + print OUT || &error("unable to write to new message"); + } +} +close(SPOOL); +open_msg($flags, \@header) if $in_header; +close(OUT); diff --git a/mbox2maildir-test b/mbox2maildir-test new file mode 100755 index 0000000..976cc53 --- /dev/null +++ b/mbox2maildir-test @@ -0,0 +1,85 @@ +#! /usr/bin/perl +# put into the public domain by Bruce Guenter <bruceg@em.ca> +# based heavily on code by Russell Nelson <nelson@qmail.org>, also in +# the public domain +# NO GUARANTEE AT ALL +# +# Creates a maildir from a mbox file + +# Assumes that nothing is trying to modify the mailboxe +# version 0.00 - first release to the public. + +require 'stat.pl'; + +sub error { + print STDERR join("\n", @_), "\n"; + exit(1); +} + +sub usage { + print STDERR "usage: mbox2maildir <mbox file> <maildir> [ <uid> <gid> ]\n"; + exit(@_); +} + +&usage(1) if $#ARGV != 1 && $#ARGV != 3;; + +$mbox = $ARGV[0]; +$mdir = $ARGV[1]; +$uid = $ARGV[2]; +$gid = $ARGV[3]; + +&error("can't open mbox '$mbox'") unless + open(SPOOL, $mbox); + +-d $mdir || mkdir $mdir,0700 || + &error("maildir '$mdir' doesn't exist and can't be created."); +chown($uid,$gid,$mdir) if defined($uid) && defined($gid); +chdir($mdir) || &error("fatal: unable to chdir to $mdir."); +-d "tmp" || mkdir("tmp",0700) || &error("unable to make tmp/ subdir"); +-d "new" || mkdir("new",0700) || &error("unable to make new/ subdir"); +-d "cur" || mkdir("cur",0700) || &error("unable to make cur/ subdir"); +chown($uid,$gid,"tmp","new","cur") if defined($uid) && defined($gid); + +$stamp = time; +sub open_msg { + my($flags,$header) = @_; + if($flags) { + if($flags =~ /RO/) { $fn = "cur/$stamp.$$.mbox:2,S"; } + elsif($flags =~ /O/) { $fn = "cur/$stamp.$$.mbox"; } + else { $fn = "new/$stamp.$$.mbox"; } + } else { + $fn = "new/$stamp.$$.mbox"; + } + $stamp++; + close(OUT); + open(OUT, ">$fn") || &error("unable to create new message"); + chown ($uid,$gid,$fn) if defined($uid) && defined($gid); + print OUT @$header, "\n"; +} + +$in_header = 0; +while(<SPOOL>) { +# if(/^Return-Path: /) { +# if(/^Date: /) { + if(/^From - /) { + open_msg($flags, \@header) if $in_header; + undef $flags; + undef @header; + $in_header = 1; + push @header, "MBOX-Line: $_"; + } elsif($in_header) { + if(/^\s+$/o) { + $in_header = 0; + open_msg($flags, \@header); + } else { + $flags = $1 if /^Status:\s+(\S+)/oi; + push @header, $_; + } + } else { + s/^>From /From /; + print OUT || &error("unable to write to new message"); + } +} +close(SPOOL); +open_msg($flags, \@header) if $in_header; +close(OUT); diff --git a/mini-mua b/mini-mua new file mode 100755 index 0000000..ee84069 --- /dev/null +++ b/mini-mua @@ -0,0 +1,16 @@ +#!/bin/sh +# Date: ~ Autumn 2002 +# Last Changed: - +# Author: Nico Schottelius <Nico-linux AT Schottelius DOT Org> +# Mini Mua +# + + +recipient="Nico Schottelius" +mailaddr="toaddr@anywhere.org" +bcc="youraddress@somewhere.org" + +read -p "Recipient [$recipient]: " temp +read -p "Mail [$mailaddr]: " temp +echo "Type message (end with CTRL + D, aka EOF)" +cat | gpg -a -e -r "$recipient" | mail -b "$bcc" -s "$subject" "$mailaddr" diff --git a/mirror.bastian b/mirror.bastian new file mode 100755 index 0000000..2a303eb --- /dev/null +++ b/mirror.bastian @@ -0,0 +1 @@ +rsync -e ssh -av nimrodxx.dyndns.info:/home/freespace/Multimedia/Donkey/xxx xxx-bastian diff --git a/mk-fensterschuss b/mk-fensterschuss new file mode 100755 index 0000000..3fef255 --- /dev/null +++ b/mk-fensterschuss @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Nico Schottelius <nico-linux@schottelius.org> +# Date: 22-Sep-2004 +# Last Modified: - +# + +if [ $# -lt 1 ]; then + echo "`basename $0` name_of_screenshot" + exit 1 +fi + +name=$1 +file="$name-screenshot-`date +%Y%m%d`.png" + +[ -e "$file" ] && return 1 +xwd | xwdtopnm | pnmtopng > "$file" diff --git a/mk-screenshot b/mk-screenshot new file mode 100755 index 0000000..f97cd35 --- /dev/null +++ b/mk-screenshot @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Nico Schottelius <nico-linux@schottelius.org> +# Date: 22-Sep-2004 +# Last Modified: - +# + +if [ $# -lt 1 ]; then + echo "`basename $0` name_of_screenshot" + exit 1 +fi + +name=$1 +file="$name-screenshot-`date +%Y%m%d`.png" + +[ -e "$file" ] && return 1 +xwd -root | xwdtopnm | pnmtopng > "$file" diff --git a/mmv b/mmv new file mode 100755 index 0000000..7903a5d --- /dev/null +++ b/mmv @@ -0,0 +1,11 @@ +#!/bin/bash +# +# multi move +# Nico Schottelius <nico-linux@schottelius.(org|net)> +# Last Changed : 8. Juni 2000 +# Usage: mmv oldext newext +# + +if [ $# -ne 2 ]; then echo "Usage: $0 old_ext new_ext";exit 1;fi + +for i in *.$1;do mv "$i" "${i%.*}.$2";done diff --git a/mopping b/mopping new file mode 100755 index 0000000..f78fa1c --- /dev/null +++ b/mopping @@ -0,0 +1,12 @@ +#/bin/sh + +HOST="uchusphere.dyndns.org" +COUNT="2" +SLEEP="2" + +while [ true ]; do + MESSAGE="$HOST online" + ping -c $COUNT $HOST >/dev/null 2>&1 || MESSAGE="$HOST offline" + echo $MESSAGE '(' `date +%H:%M` ')' + sleep $SLEEP +done diff --git a/mount-musik b/mount-musik new file mode 100755 index 0000000..27ae513 --- /dev/null +++ b/mount-musik @@ -0,0 +1 @@ +smbmount //$1/spezial /mnt/$1/ -o username=nico,uid=500 diff --git a/mp3ver2file b/mp3ver2file new file mode 100755 index 0000000..285012f --- /dev/null +++ b/mp3ver2file @@ -0,0 +1,21 @@ +#!/bin/sh +# Author: Nico Schottelius (nicos@pcsystems.de) +# Date: 30. May 2000 +# Last Changed : 30. May 2000 +# Comment: Move hallo/spencer.mp3 to hallo-spencer.mp3 +# Comment: Attention : `mp3ver3file "dirs"` <-- quotes! + +list=$@ + +for gruppen in $list + do + cd "$gruppen" + echo $gruppen + for lieder in * + do + # For testing purposes + #echo "$lieder" "../${gruppen}-${lieder}" + mv -- "$lieder" "../${gruppen}-${lieder}" + done + cd .. +done diff --git a/ms-google b/ms-google new file mode 100755 index 0000000..e972859 --- /dev/null +++ b/ms-google @@ -0,0 +1,20 @@ + +# seconds to wait +#WAIT="42" +WAIT="23" + +#AGENT="Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)" +AGENT="Mozilla/4.0 (compatible; MSIE 5.5; Windows 2004)" + +REFERER='http://http:llwww.google.de/search?q=linux' + +#URL='http://www.google.de/url?sa=l&q=http://tracking-microsoftch.qualitraffic.de/105.html%3Freferer%3Dgoogle_select&ai=Bh8poE-IRQs7aH7_sQae16egI1J_tCLz9oJ4B6YeHBtCGAxABGAEoBDgAQMQVSKw5yAEB&num=1' +URL='http://www.google.de/url?q=http://tracking-microsoftch.qualitraffic.de/105.html%3Freferer%3Dgoogle_select&sa=L&ai=Bh8poE-IRQs7aH7_sQae16egI1J_tCLz9oJ4B6YeHBtCGAxABGAEoBDgAQMQVSKw5yAEB&client=' + +http://www.google.ch/url?sa=l&q=http://tracking-microsoftch.qualitraffic.de/62.html%3Freferer%3Dgoogle_select&ai=BSUtaz0oUQumLOsmgQcLu7ckI1J_tCLz9oJ4B6YeHBvCiBBACGAIoBzgAQMQVSKw5yAEB&num=2 + +while true; do + curl -A "$AGENT" -e "$REFERER" "$URL" + sleep $WAIT +done + diff --git a/ms-google3 b/ms-google3 new file mode 100755 index 0000000..3a89c92 --- /dev/null +++ b/ms-google3 @@ -0,0 +1,34 @@ +#!/bin/sh + + +GOOGLE_URL='http://www.google.ch/search?hl=de&q=linux' +REFERER="$GOOGLE_URL" + +# the begin of the string which ends in a whitespace +MS_AD='href=/url?sa=l&q=http://tracking-microsoftch.qualitraffic.de' +MS_AD_SED="`echo $MS_AD | sed 's/\//\\\//g'`" + +# only matching lines +SED_1="'/$MS_AD_SED/!d'" + +echo $SED_1 + +exit 1 + +# seconds to wait between queries +#WAIT="42" +WAIT="23" + +# user agent +#AGENT="Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)" +AGENT="Mozilla/4.0 (compatible; MSIE 5.5; Windows 2004)" + + +#URL='http://www.google.de/url?sa=l&q=http://tracking-microsoftch.qualitraffic.de/105.html%3Freferer%3Dgoogle_select&ai=Bh8poE-IRQs7aH7_sQae16egI1J_tCLz9oJ4B6YeHBtCGAxABGAEoBDgAQMQVSKw5yAEB&num=1' +URL='http://www.google.de/url?q=http://tracking-microsoftch.qualitraffic.de/105.html%3Freferer%3Dgoogle_select&sa=L&ai=Bh8poE-IRQs7aH7_sQae16egI1J_tCLz9oJ4B6YeHBtCGAxABGAEoBDgAQMQVSKw5yAEB&client=' + +while true; do + curl -A "$AGENT" -e "$REFERER" "$URL" + sleep $WAIT +done + diff --git a/myX b/myX new file mode 100755 index 0000000..9b401c7 --- /dev/null +++ b/myX @@ -0,0 +1,6 @@ +#!/bin/sh + +X & +export DISPLAY=localhost:0 # use tcp/ip and not unix domain! +sleep 2; +blackbox diff --git a/myfrisk b/myfrisk new file mode 100755 index 0000000..f1fceba --- /dev/null +++ b/myfrisk @@ -0,0 +1,15 @@ +#!/bin/sh + +HOST="localhost" + +friskserver & + +# wait some seconds to let friskserver initialize +sleep 2 + +aiConway $HOST & +aiColson $HOST & + +sleep 2; + +xfrisk $HOST & diff --git a/neta-auswertung b/neta-auswertung new file mode 100755 index 0000000..fcb6235 --- /dev/null +++ b/neta-auswertung @@ -0,0 +1 @@ +neta "$1" | grep -i -e USER -e PASS -B 2 -A 2 diff --git a/netzscan b/netzscan new file mode 100755 index 0000000..b3ef628 --- /dev/null +++ b/netzscan @@ -0,0 +1,9 @@ +BASE=192.168.0 +SMBCLIENT="nmap" + +i=0 + +while [ $i -lt 255 ]; do + $SMBCLIENT "$BASE"."$i" + i=$[$i+1] +done diff --git a/new-mail-arrived b/new-mail-arrived new file mode 100755 index 0000000..bebd16e --- /dev/null +++ b/new-mail-arrived @@ -0,0 +1,4 @@ +fetchmail &>/dev/null +#ogg123 ~/computer/audio/aol/alle/m00001a2.wav &>/dev/null +ogg123 temp/test.ogg +#ogg123 ~/computer/audio/fun/gotmail.ogg &>/dev/null diff --git a/newnameserver b/newnameserver new file mode 100755 index 0000000..3b5b8f0 --- /dev/null +++ b/newnameserver @@ -0,0 +1,118 @@ +#!/bin/bash +# Author: Nico Schottelius ( nicos@pcsystems.de ) +# Last Modified by: +# Date: 20th of January 2000 +# Last Changed: 20th of January +# Description: Skript which does mapping and reverse +# + +# My variables :-) +host="" +ip="" +choice="y" +class="" +domain="mignet.magrathea.de" + + +# Title +echo "## Neuer Nameserver-Eintrag ##" +read -p "Bitte Domain eingeben ($domain) : " domain + +# Check if zero domain +if [ -z "$domain" ]; then domain="mignet.magrathea.de";fi + +# Main loop for more than one host in a domain +while [ "$choice" = "y" -o "$choice" = "Y" ] +do + +read -p "Hostname tippen: " host +read -p "IP klopfen: " ip +read -p "NetClass eingeben: (a,b,c): " class + +echo -n "Uno momento..." + + +# The real program + +# First mapping +if [ -e /var/named/$domain ]; + then + echo "$host IN A $ip" >> /var/named/$domain +else + cat << EOF >> /etc/named.conf + +zone "$domain" in { + type master; + file "$domain"; +}; +EOF + cat /var/named/sample/domain > /var/named/$domain + echo "$host IN A $ip" >> /var/named/$domain +fi +echo -n "." + +# Lookup the host and net id, to choose the right arpa file +# For A it is net=172 host=16.1.1 +if [ $class = a -o $class = A ]; + then + # Get the arpa file + net=`echo $ip | cut -d. -f1` + + # Get the hostid. + ho=`echo $ip |cut -d. -f2-4` + + # The reverse Net + rnet=$net + +# For B it is net=172.16 host=1.1 +elif [ $class = b -o $class = B ]; + then + # Get the arpa file + net=`echo $ip | cut -d. -f1-2` + + # Get the hostid. + ho=`echo $ip | cut -d. -f3-4` + + # The reverse Net + rnet1=`echo $ip | cut -d. -f1` + rnet2=`echo $ip | cut -d. -f2` + rnet="$rnet2.$rnet1" + +# For C it is net=172.16.1 host=1 +elif [ $class = c -o $class = C ]; + then + # Get the arpa file + net=`echo $ip | cut -d. -f1-3` + + # Get the hostid. + ho=`echo $ip | cut -d. -f4` + + # The reverse Net + rnet1=`echo $ip | cut -d. -f1` + rnet2=`echo $ip | cut -d. -f2` + rnet3=`echo $ip | cut -d. -f3` + rnet="$rnet3.$rnet2.$rnet1" +fi + +echo -n "." + +if [ -e /var/named/reverse/$net ]; + then + echo "$ho IN PTR $host.$domain." >> /var/named/reverse/$net + +else + cat << EOF >> /etc/named.conf + +zone "${rnet}.in-addr.arpa" in { + type master; + file "reverse/$net"; +}; +EOF + + cat /var/named/sample/reverse > /var/named/reverse/$net + echo "$ho IN PTR $host.$domain." >> /var/named/reverse/$net +fi +echo -n "." +echo 'Finito :-)' +read -p "Noch einen Host in $domain eintragen ? " choice +done diff --git a/nice_xclock b/nice_xclock new file mode 100755 index 0000000..4223825 --- /dev/null +++ b/nice_xclock @@ -0,0 +1 @@ +xclock -fg green -bg black -hd red -hl green diff --git a/notizen b/notizen new file mode 100755 index 0000000..49b001d --- /dev/null +++ b/notizen @@ -0,0 +1,2 @@ +#/bin/sh +vi ~/.N0t.zen diff --git a/ns_ldif_to_mutt_alias b/ns_ldif_to_mutt_alias new file mode 100755 index 0000000..4daf0ba --- /dev/null +++ b/ns_ldif_to_mutt_alias @@ -0,0 +1,57 @@ +#!/bin/sh +# +# Author: Nico Schottelius <nico@schottelius.(net|org)> +# Date: 7th of March 2002 +# Last changed: 12th of March 2002 +# Comment: convert netscapes addressbook to mutt's alias file +# Bugs: +# OldBugs: +# possibly add better alias [instead of ns] -- done, 12/March/2002 +# +# +# +# Netscape sample: +# +# dn: cn=First middle lastname,mail=addressfrom@someone.org +# +# mutt sample: +# +# alias shortname more details <the@address> +# + +NS_DATA_START="^dn:" + +if [ $# -lt 1 ]; then + echo `basename $0`: 'netscapefile(s)' + echo 'Will output mutt alias format' + echo 'Attention: Short names are generated, please change them correctly' + exit 1 +fi + +# alias name1 name2 name3 <emailaddr> to +# alias name1name2name3 name1 name2 name3 <emailaddr> + +# awk helper +awk_func() +{ + awk ' + /^alias .* <.*>$/ { # only use right pattern + save=ORS # is \n + ORS="" # reset, so we print one line + line++; # count lines + print $1 " " # == alias + for(j=2;j<NF;j++) # now everything before the email + print $j +# print line # if you like to have a number behind everyone... + for(i=2;i<=NF;i++) # now print it with spaces, included mail address + print " " $i + ORS=save # restore \n + print "" # and add line break + } ' +} + +# now convert the Addressbook! +for mfile in $@; do + cat $mfile | grep $NS_DATA_START | \ + sed 's/dn: cn=\(.*\),mail=\(.*\)/alias \1 <\2>/g' | awk_func +done diff --git a/nsmail2maildir b/nsmail2maildir new file mode 100755 index 0000000..2aa60d5 --- /dev/null +++ b/nsmail2maildir @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Nico Schottelius <nico@schottelius.(net|org)> +# Date: 22-Sep-2003 +# Last Modified: 26-Sep-2003 +# +# some code stolen from mbox2maildir by Bruce Guenter <bruceg@em.ca>, +# which based on mbox2maildir by Russell Nelson <nelson@qmail.org> +# first this was a shellscript, now it's a perlscript + +# this is where all the mails goto +MAILDIR_BASE=/home/user/nico/Maildir/nsmail2 + +for spool in $@; do + i=0 + MAILDIR=$MAILDIR_BASE/`basename $spool`-$i; + MAIL=$spool + mkdir -p $MAILDIR/{new,cur,tmp} + if [ -f "$MAIL" ]; then + echo Settings: $MAILDIR - $MAIL +# mbox2maildir-test "$MAIL" "$MAILDIR" + #read -p "converted $spool" + fi + i=$[$i+1] +done diff --git a/nsmail2maildir-01 b/nsmail2maildir-01 new file mode 100644 index 0000000..b109ce6 --- /dev/null +++ b/nsmail2maildir-01 @@ -0,0 +1,101 @@ +#!/usr/bin/perl +# +# Nico Schottelius <nico@schottelius.(net|org)> +# Date: 22-Sep-2003 +# Last Modified: 26-Sep-2003 +# +# some code stolen from mbox2maildir by Bruce Guenter <bruceg@em.ca>, +# which based on mbox2maildir by Russell Nelson <nelson@qmail.org> +# first this was a shellscript, now it's a perlscript + +require 'stat.pl'; +use File::Find; + +# this is where all the mails goto +MAILDIR_BASE=/home/user/nico/Maildir/nsmail + +for spool in $@; do + i=0 + MAILDIR=$MAILDIR_BASE/`basename $spool`-$i; + MAIL=$spool + mkdir -p $MAILDIR/{new,cur,tmp} + if [ ! -d "$MAIL" -a -f "$MAIL" ]; then + echo Settings: $MAILDIR - $MAIL + echo mbox2maildir-test "$MAIL" "$MAILDIR" + read -p "converted $spool" + fi + $i++; +done + +sub error { + print STDERR join("\n", @_), "\n"; + exit(1); +} + +sub usage { + print STDERR "usage: nsmail2maildir <nsmaildirfile> <destinationdir>\n"; + exit(@_); +} + +# check args +&usage(1) if $#ARGV != 2; + +$mbox = $ARGV[0]; +$ddir = $ARGV[1]; + +&error("can't open mbox '$mbox'") unless + open(SPOOL, $mbox); + +-d $ddir || mkdir $ddir,0700 || + &error("destinationdir '$mdir' doesn't exist and can't be created."); + +-d $ddir || mkdir $ddir,0700 || + &error("destinationdir '$mdir' doesn't exist and can't be created."); +chown($uid,$gid,$mdir) if defined($uid) && defined($gid); +chdir($mdir) || &error("fatal: unable to chdir to $mdir."); +-d "tmp" || mkdir("tmp",0700) || &error("unable to make tmp/ subdir"); +-d "new" || mkdir("new",0700) || &error("unable to make new/ subdir"); +-d "cur" || mkdir("cur",0700) || &error("unable to make cur/ subdir"); +chown($uid,$gid,"tmp","new","cur") if defined($uid) && defined($gid); + +$stamp = time; +sub open_msg { + my($flags,$header) = @_; + if($flags) { + if($flags =~ /RO/) { $fn = "cur/$stamp.$$.mbox:2,S"; } + elsif($flags =~ /O/) { $fn = "cur/$stamp.$$.mbox"; } + else { $fn = "new/$stamp.$$.mbox"; } + } else { + $fn = "new/$stamp.$$.mbox"; + } + $stamp++; + close(OUT); + open(OUT, ">$fn") || &error("unable to create new message"); + chown ($uid,$gid,$fn) if defined($uid) && defined($gid); + print OUT @$header, "\n"; +} + +$in_header = 0; +while(<SPOOL>) { + if(/^From /) { + open_msg($flags, \@header) if $in_header; + undef $flags; + undef @header; + $in_header = 1; + push @header, "MBOX-Line: $_"; + } elsif($in_header) { + if(/^\s+$/o) { + $in_header = 0; + open_msg($flags, \@header); + } else { + $flags = $1 if /^Status:\s+(\S+)/oi; + push @header, $_; + } + } else { + s/^>From /From /; + print OUT || &error("unable to write to new message"); + } +} +close(SPOOL); +open_msg($flags, \@header) if $in_header; +close(OUT); diff --git a/offlinegehen b/offlinegehen new file mode 100755 index 0000000..1f4d794 --- /dev/null +++ b/offlinegehen @@ -0,0 +1 @@ +ssh root@creeper "killall pppd" diff --git a/oldterm b/oldterm new file mode 100755 index 0000000..bb0317d --- /dev/null +++ b/oldterm @@ -0,0 +1,23 @@ +#!/bin/bash +# +# old terminal +# Nico Schottelius <nico-linux@schottelius.(org|net)> +# Last Changed : 8. Juni 2000 +# + +title="phosphor" +colour="darkgreen" + +xterm -fg $colour -bg black -bd $colour -cr $colour -hc $colour \ +-title $title -name $title -T $title \ +-bc -bcf 1000 -bcn 900 -fb *-*-bold-*-*-*-*-*-*-*-*-*-*-* \ +-fn '-misc-fixed-bold-r-normal-*-*-*-*-*-*-*-iso8859-1' \ +-ls -mesg -bw 8 +cu +dc +s +sb -sl 1500 -ulc $@ + +# other fonts +#-fn '-adobe-*-bold-r-*-*-*-140-*-*-*-*-iso8859-*' \ +# -fn '-misc-fixed-bold-r-normal-*-15-120-100-100-c-90-*-*' \ +# -fn '-misc-fixed-*-*-*-*-*-*-*-*-*-*-*-*' \ + +# -u8 does not like german characters... +#-ls -mesg -bw 8 +cu +dc +s +sb -sl 1500 -ulc -u8 diff --git a/ozean_aus b/ozean_aus new file mode 100755 index 0000000..fb84d6d --- /dev/null +++ b/ozean_aus @@ -0,0 +1 @@ +ssh ozean -lroot "shutdown -h now" diff --git a/pgp-saug b/pgp-saug new file mode 100755 index 0000000..1c7d107 --- /dev/null +++ b/pgp-saug @@ -0,0 +1 @@ +gpg --recv-keys $@ diff --git a/ping_alive b/ping_alive new file mode 100755 index 0000000..a3e337a --- /dev/null +++ b/ping_alive @@ -0,0 +1,20 @@ +#!/bin/sh + +HOST="192.168.0.1" + +ret="true" +sleep="2" +count="2" + +if [ -n "$1" ]; then HOST=$1;fi + +while true; do + ping -c$count $HOST >/dev/null 2>/dev/null || ret=failed + if [ $ret = "failed" ]; then + echo "Failed: "`date` + else + echo "Recieved: "`date` + fi + sleep $sleep +done + diff --git a/ping_pong.sh b/ping_pong.sh new file mode 100644 index 0000000..e93917c --- /dev/null +++ b/ping_pong.sh @@ -0,0 +1,11 @@ +HOSTS="www.spiegel.de www.lernen.de www.isc.org B.ROOT-SERVERS.NET" + +STATUS=offline + +for myh in $HOSTS; do + ping -c1 $myh >/dev/null 2>&1 && STATUS=online +done + +if [ "$STATUS" = offline ]; then + echo 'Offline.'`date` +fi diff --git a/play_wave b/play_wave new file mode 100755 index 0000000..372cd3b --- /dev/null +++ b/play_wave @@ -0,0 +1 @@ +cat $@ | oggenc - | ogg123 - diff --git a/pre_prefix b/pre_prefix new file mode 100755 index 0000000..4df1772 --- /dev/null +++ b/pre_prefix @@ -0,0 +1,16 @@ +#!/bin/sh +# Author: Nico Schottelius <nico AT schottelius DOT org> +# Date: 14th of February 2002 +# + +if [ $# -ne 2 ]; then + echo `basename $0`': prefix file' + echo 'Hey, hey guy, what to convert ?' + exit 1 +fi + +# something other programs do not use +G_STR=".`date +%s%M%U`-`basename $0`-`basename $2`" + +cat $2 | sed "s,^prefix.*=\(.*\),prefix = $1\1,g" > $G_STR +mv $G_STR $2 diff --git a/pre_release b/pre_release new file mode 100755 index 0000000..918a115 --- /dev/null +++ b/pre_release @@ -0,0 +1,13 @@ +#!/bin/sh + +file=$1 +host=creme.schottelius.org +dir=public_html/pre-release/ +url="http://schotteli.us/~nico/pre-release" + +[ -z "$file" ] && exit 1 + +scp "$file" "${host}:$dir" +ssh $host "chmod a+r $dir/$file" + +echo "Pre-released ${url}/${file}" diff --git a/print_ozean b/print_ozean new file mode 100755 index 0000000..2e56878 --- /dev/null +++ b/print_ozean @@ -0,0 +1,8 @@ +#!/bin/bash + +server="ozean" +printcmd="/home/utils/easy_print" + +cat $@ | ssh $server -lroot "$printcmd" + +#ssh $server -lroot "$printcmd $basedir/$1" diff --git a/remove_first_lines b/remove_first_lines new file mode 100755 index 0000000..24a5620 --- /dev/null +++ b/remove_first_lines @@ -0,0 +1,22 @@ +#!/bin/sh +# +# Nico Schottelius <nico-linux@schottelius.org> +# Date: 15-Sep-2004 +# Last Modified: - +# +# Removes the first n lines + +if [ $# -ne 2 ]; then + echo "$0: "'<lines_to_cut> <file>' + exit 1 +fi + +CUT_LINES=$1 +FILE=$2 + +LINES=`cat "$FILE" | wc -l` + +TAIL_LINES=`echo "${LINES}-${CUT_LINES}" | bc` +echo $TAIL_LINES + +tail -n "$TAIL_LINES" "$FILE" diff --git a/remove_wrong_x b/remove_wrong_x new file mode 100755 index 0000000..4d05134 --- /dev/null +++ b/remove_wrong_x @@ -0,0 +1,19 @@ +#!/bin/sh + +#file=`ls -l $1 | egrep '^d' | awk ' {print $9 }'` +#if [ -z file ]; then echo $1;fi + +# echo gerade : $1 +# file : $file + +if [ -d "$1" ] + then + echo "dir : $1" + chmod u=rwx,g=rx,o-rwx $1 +elif [ -x "$1" ];then + echo "exe: $1" + chmod u=rwx,g=rx,o-rwx $1 +else + echo "file: $1" + chmod g=r,o-rwx $1 +fi diff --git a/remove_wrong_x-2 b/remove_wrong_x-2 new file mode 100755 index 0000000..e63c63f --- /dev/null +++ b/remove_wrong_x-2 @@ -0,0 +1,19 @@ +#!/bin/sh + +#file=`ls -l $1 | egrep '^d' | awk ' {print $9 }'` +#if [ -z file ]; then echo $1;fi + +# echo gerade : $1 +# file : $file + +if [ -d "$1" ] + then + echo "dir : $1" + chmod u=rwx,g=rx,o-rwx $1 +elif [ -x "$1" ];then + echo "exe: $1" + chmod u+rw,g+rx,o-rwx $1 +else + echo "file: $1" + chmod u+rw,g+r,o-rwx $1 +fi diff --git a/replace-old-files b/replace-old-files new file mode 100755 index 0000000..f0e852f --- /dev/null +++ b/replace-old-files @@ -0,0 +1,14 @@ +FILE=/tmp/replace-`date +%s` +OLD_STRING=/usr/old-files/bin +NEW_STRING=/usr/bin + +if [ $# -ne 1 ]; then + echo neo + exit 1 +fi + +if [ `grep "$OLD_STRING" "$1"` ]; then + echo "$1" + cat "$1" | sed "s,$OLD_STRING,$NEW_STRING,g" > "$FILE" + mv "$FILE" "$1" +fi diff --git a/replace_prefix b/replace_prefix new file mode 100755 index 0000000..66a09c5 --- /dev/null +++ b/replace_prefix @@ -0,0 +1,16 @@ +#!/bin/sh +# Author: Nico Schottelius <nico AT schottelius DOT org> +# Date: 14th of February 2002 +# + +if [ $# -ne 2 ]; then + echo `basename $0`': prefix file' + echo 'Hey, hey guy, what to convert ?' + exit 1 +fi + +# something other programs do not use +G_STR=".`date +%s%M%U`-`basename $0`-`basename $2`" + +cat $2 | sed "s,\(^prefix.*=\).*,\1 $1,g" > $G_STR +mv $G_STR $2 diff --git a/rip-wave2ogg b/rip-wave2ogg new file mode 100755 index 0000000..d24dab8 --- /dev/null +++ b/rip-wave2ogg @@ -0,0 +1,29 @@ +#!/bin/sh +# Nico Schottelius +# 21-Mar-2004 +# + +if [ $# -lt 2 ]; then + echo "usage: `basename $0` <outputdir> <directory(ies) with waves>" + exit 1 +fi + +RIPDIR="$1"; shift + +if [ ! -d "$RIPDIR" ]; then + echo "$RIPDIR must be an existing directory" + exit 1 +fi + +cd $RIPDIR + +for dir in $@; do + if [ ! -d "$dir" ]; then + echo "Skipping $dir, is not an existing directory" + continue + fi + echo "Ripping $dir .." + + find "$dir" -exec rip-wave2ogg.doit "$dir" {} \; + +done diff --git a/rip-wave2ogg.doit b/rip-wave2ogg.doit new file mode 100755 index 0000000..d68ac39 --- /dev/null +++ b/rip-wave2ogg.doit @@ -0,0 +1,35 @@ +#!/bin/sh +# Nico Schottelius +# + + +if [ $# -ne 2 ]; then + echo "me basedir filename: $#" + echo $@ + exit 1 +fi + + +# $1 = basedir +# $2 = filename +# pwd = current dir +BDIR="$1" +FILE="$2" + +# wrong! wrong! +NEWFILE=`basename "$FILE" "$BDIR"` +#NEWFILE=`echo $FILE | sed "s,$BDIR/,," | sed "s,\$,.ogg,"` + +echo $BDIR +echo $FILE +echo $NEWFILE + +exit 0 + + if [ -d "$FILE" ]; then + echo "Creating $NEWFILE" + mkdir "$NEWFILE" + else + echo "Ripping $FILE to $NEWFILE..." + oggenc -o "$NEWFILE" "$FILE" + fi diff --git a/ripaol b/ripaol new file mode 100755 index 0000000..dcfaae0 --- /dev/null +++ b/ripaol @@ -0,0 +1,3 @@ +for file in `find /mnt/dvd/ | grep .wav\$`; do + cat $file | oggenc - > `basename $file` +done diff --git a/rootX b/rootX new file mode 100755 index 0000000..0d585c2 --- /dev/null +++ b/rootX @@ -0,0 +1,8 @@ +#!/bin/sh + +ozean="/home/user/nico/bin/ssh/ozean" +eiche="/home/user/nico/bin/ssh/eiche" + +xterm -ls -title "Eiche Root" -e "$eiche" & +xterm -ls -title "Ozean Root" -e "$ozean" & + diff --git a/rootxterm b/rootxterm new file mode 100755 index 0000000..39a7cdc --- /dev/null +++ b/rootxterm @@ -0,0 +1,5 @@ +#xterm -fg red -bg black -ls -title r00t -name r00t -bd green -bc -bcf 900 -bcn 750 + +title="r00t" + +xterm -fg red -bg black -ls -title $title -name $title -T $title -bd green -bw 8 -bc -bcf 900 -bcn 750 -cr darkgreen +cu +dc -hc green -mesg -s -sb -leftbar -sl 1500 -ulc -u8 -e su -l diff --git a/rrmdir b/rrmdir new file mode 100755 index 0000000..3179f24 --- /dev/null +++ b/rrmdir @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then + echo 'Error: missing arguments' 1>&2 + echo 'Usage: rmdirtree file [file ...]' 1>&2 +exit 1 +fi + +find "$@" -depth -type d -print0 | xargs -0 rmdir diff --git a/run_prog b/run_prog new file mode 100755 index 0000000..3d88bd5 --- /dev/null +++ b/run_prog @@ -0,0 +1,19 @@ +title="run program" +colour="darkblue" +geometry="30x1" +prog="run_prog-sh" + +xterm -fg $colour -bg black -bd $colour -cr $colour -hc $colour \ +-title "$title" -name "$title" -T "$title" \ +-bc -bcf 1000 -bcn 900 -fb *-*-bold-*-*-*-*-*-*-*-*-*-*-* \ +-fn '-misc-fixed-bold-r-normal-*-*-*-*-*-*-*-iso8859-15' \ +-geometry "$geometry" \ +-ls -mesg -bw 8 +cu +dc +s +sb -sl 1500 -ulc -e "$prog" $@ + +# other fonts +#-fn '-adobe-*-bold-r-*-*-*-140-*-*-*-*-iso8859-*' \ +# -fn '-misc-fixed-bold-r-normal-*-15-120-100-100-c-90-*-*' \ +# -fn '-misc-fixed-*-*-*-*-*-*-*-*-*-*-*-*' \ + +# -u8 does not like german characters... +#-ls -mesg -bw 8 +cu +dc +s +sb -sl 1500 -ulc -u8 diff --git a/run_prog-sh b/run_prog-sh new file mode 100755 index 0000000..7458611 --- /dev/null +++ b/run_prog-sh @@ -0,0 +1,3 @@ +command="Command: " +read -p "$command" command +$command & diff --git a/saver b/saver new file mode 100755 index 0000000..4283cd6 --- /dev/null +++ b/saver @@ -0,0 +1,14 @@ +#!/bin/sh + +case "$1" in + on) + xscreensaver -nosplash & + ;; + off) + killall xscreensaver + ;; + lock) + xscreensaver -nosplash & + xscreensaver-command -lock & + ;; +esac diff --git a/sc b/sc new file mode 100755 index 0000000..461545f --- /dev/null +++ b/sc @@ -0,0 +1,6 @@ +export PS1=":: uchu :: " +export PS2="" +export PS3="" +export PROMPT_COMMAND="" +cd /home/server/samba/transfer/viri +clear diff --git a/scan_smb b/scan_smb new file mode 100755 index 0000000..6b1bbad --- /dev/null +++ b/scan_smb @@ -0,0 +1,7 @@ + +if [ $# -lt 1 ] ; then + echo noe + exit 1 +fi + +smbclient $@ -n STEVEN2 -N diff --git a/screen-login b/screen-login new file mode 100755 index 0000000..f307f1c --- /dev/null +++ b/screen-login @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Author: Nico Schottelius <nico@schottelius.net> +# Date: 03-Dec-2002 +# Last Modified: 03-Dec-2002 +# Comment: Automaticly start screen. But only one time +# Comment: Connect to old session if it exists. +# Comment: Allows multiply views of one session. +# Comment: The problem is we get called recursivly: first login->bash +# Comment: and the screen calls bash again. +# + +# 1. are we in screen or are we login' in ? +if [ -z "$STY" ]; then # login in + # check for existing screen + /usr/util/bin/screen -x + if [ "$?" -eq 1 ]; then # no screen running + /usr/util/bin/screen -q # start a new screen + fi +else # screen starts us + /bin/bash --login +fi + +# don't keep on beeing in normal login shell +exit diff --git a/securemail b/securemail new file mode 100755 index 0000000..7ad0ade --- /dev/null +++ b/securemail @@ -0,0 +1,25 @@ +#!/bin/sh +# Nico Schottelius (c) 2001 +# nico-linux at schottelius dot org +# make secure connections to your mail servers +# used at conferences / congresses / meetings +# + +POP3=110 +POP3S=995 +IMAP=143 +IMAPS=993 + +# our secured host +HOST="217.14.64.75" +#HOST="creme.schottelius.org" +#HOST="213.146.113.242" +#HOST="bruehe.schottelius.org" + +ssh -T -f -C -N -L2323:smtp.syhosting.ch:$IMAPS "$HOST" +ssh -T -f -C -N -L2342:smtp.syhosting.ch:$POP3S "$HOST" +ssh -T -f -C -N -L4242:creme.schottelius.org:$IMAPS "$HOST" + +#ssh -T -f -C -N -L4242:mail.schottelius.org:$POP3 "$HOST" +#ssh -T -f -C -N -L2323:mail.schottelius.org:25 mail.schottelius.org +#ssh -T -f -C -N -L2323:mail.folz.de:110 "$HOST" diff --git a/securemail.off b/securemail.off new file mode 100755 index 0000000..082ab7a --- /dev/null +++ b/securemail.off @@ -0,0 +1,7 @@ +#!/bin/sh +# Nico Schottelius (c) 2001 +# nico-linux at schottelius dot org +# Kill ssh tunnels +# + +pkill -f -u nico "ssh -T -f -C -N -L" diff --git a/set_permissions b/set_permissions new file mode 100755 index 0000000..d669d29 --- /dev/null +++ b/set_permissions @@ -0,0 +1,17 @@ +#!/bin/sh + +# +# /usr/bin is obsolete +# /usr/lib is obsolete +# /usr/*/{bin,lib,...} is now the correct path +# +USR="/usr/*" + +for tmp in $USR;do + echo chown root.`echo "$tmp" | sed 's,/usr/,,'` -R $tmp +done + +find /usr -exec 'if [ -d "$1" ];then chmod u=rwx,g=rx,o-rwx $1 + elif [ -x "$1" ];then chmod u+rw,g+rx,o-rwx $1 + else chmod u+rw,g+r,o-rwx $1 + fi' \; diff --git a/show_calendar b/show_calendar new file mode 100755 index 0000000..f8adfa0 --- /dev/null +++ b/show_calendar @@ -0,0 +1,27 @@ +#!/bin/sh +# +# Nico Schottelius +# Date: 13-May-2003 +# Last Modified: 2004-09-06 +# usage: show_calendar <date> [date] +# Format: DD.MM., DD.MM.YYYY +# add $CALDIR/files: +# ----------------------- +# cat $CALDIR/test +# 01.09: auto ansehen.. +# ----------------------- +# + +CALDIR=~/calendar + +if [ $# -lt 1 ]; then + echo `basename $0` 'day.month [day.month.year]' + exit 1 +fi + +cd $CALDIR +for file in *; do + for date in $@ TO.DO; do + egrep --with-filename -A 2 -e "^${date}:" "$file" + done +done diff --git a/sisctrl b/sisctrl new file mode 100755 index 0000000..1d1ea28 Binary files /dev/null and b/sisctrl differ diff --git a/slowtar b/slowtar new file mode 100755 index 0000000..4e77ab3 --- /dev/null +++ b/slowtar @@ -0,0 +1,39 @@ +#!/bin/bash +# Author: Nico Schottelius (nicos@pcsystems.de) +# Use: If tar is too fast, we 'll slow it down with dd +# Use: In /etc/crontab , "30 6 * * * /root/bin/slowtar", to run backup +# ever morning at 6:30 +# Date: 18th Jan 2000 +# Last Modified: 18 Jan 2000 +# Last Modified by: + +##################################### START #################################### +###################### Change everthing you need here ########################## +##################################### START #################################### + +# To which device backup ? +DEV="/dev/st0" + +# What speed to user for the device ? +# Use 8k for floppy disk +SPEED="1000k" + +# Which Directories should be backuped ? +DIRS="/etc" + +# Set the logfile base name ($LOG.err is the error file) +LOG="/var/log/backup" + +##################################### STOP ##################################### +###################### No more changes need under this line #################### +##################################### STOP ##################################### + +# First display a nice message for the syslog daemon. +echo "Starting backup...you can find the log in $LOG" + +#Tar the files and copy them to you device via streamer +tar -cvf- -b1000 $DIRS | dd of=$DEV bs=$SPEED >> $LOG 2>> ${LOG}.err + +#Finished & Cleanup +echo "Backup done." +unset DEV DIRS LOG diff --git a/smbmessage-classc b/smbmessage-classc new file mode 100755 index 0000000..8e87ab1 --- /dev/null +++ b/smbmessage-classc @@ -0,0 +1,10 @@ +BASE=192.168.0 +MESSAGE="Network Failure" +SMBCLIENT="smbclient -n NONE -M" + +i=1 + +while [ $i -lt 255 ]; do + echo $MESSAGE | $SMBCLIENT "$BASE"."$i" + i=$[$i+1] +done diff --git a/smbscan b/smbscan new file mode 100755 index 0000000..d82554f --- /dev/null +++ b/smbscan @@ -0,0 +1,9 @@ +#!/bin/sh + + +i=0; + +while [ $i -lt 255 ]; do + smbclient -U Administrator -N -W workgroup -L $1.$i + i=$[$i+1] +done diff --git a/smbscan-2 b/smbscan-2 new file mode 100755 index 0000000..ef18294 --- /dev/null +++ b/smbscan-2 @@ -0,0 +1,9 @@ +BASE=192.168.0 +SMBCLIENT="smbclient -n NONE -L" + +i=0 + +while [ $i -lt 255 ]; do + $SMBCLIENT "$BASE"."$i" + i=$[$i+1] +done diff --git a/sort-backup b/sort-backup new file mode 100755 index 0000000..723092d --- /dev/null +++ b/sort-backup @@ -0,0 +1,6 @@ +if [ -z "$1" ]; then + echo "searchdir, please" + exit 1 +fi + +find "$1" -exec sort-backup.dothejob ~/sorted-backup {} \; diff --git a/sort-backup.dothejob b/sort-backup.dothejob new file mode 100755 index 0000000..0902e34 --- /dev/null +++ b/sort-backup.dothejob @@ -0,0 +1,77 @@ +#!/bin/sh +# Nico Schottelius +# sort files by type and delete binaries +# 17-Jan-2004 +# I used this script to sort my backup +# +# syntax: +# find $dir -exec $thisscript $outputdir {} \; +# +# example: +# find ~/backup -exec sort-backup.dothejob ~/sorted {} \; +# + +DIR="$1" +FILE="$2" +TYPE=`file "$FILE" | sed 's/.*://'` +RM="rm -f" +MV="mv -i" +MKDIR="mkdir -p" + +case "$TYPE" in + " ELF 32-bit LSB"*) + echo "Removing $FILE" + $RM -f "$FILE" + exit 0 + ;; + *"image data"*) + echo "Moving $FILE to images" + TARGETDIR="$DIR/images" + ;; + *MPEG*) + echo "Moving $FILE to sorted/video" + TARGETDIR="$DIR/video" + ;; + *"MP3"*|*"libVorbis"*) + echo "Moving $FILE to audio" + TARGETDIR="$DIR/msdoc" + ;; + *Microsoft*) + echo "Moving $FILE to msdoc" + TARGETDIR="$DIR/msdoc" + ;; + *"gzip compressed data"*|*"Zip archive data"*) + echo "Moving $FILE to archives" + TARGETDIR="$DIR/archives" + ;; + *"mail text"*) + echo "Moving $FILE to mails" + TARGETDIR="$DIR/mails" + ;; + " data") + echo "Moving $FILE to data" + TARGETDIR="$DIR/data" + ;; + *) + echo "Do nothing with $FILE ($TYPE )" + exit 0 + ;; +esac + +if [ ! -e "$TARGETDIR" ]; then + echo "Creating $TARGETDIR" + $MKDIR "$TARGETDIR" +fi +if [ ! -d "$TARGETDIR" ]; then + echo "Don\'t fool me, I assumed "$TARGETDIR" is a directory." + exit 1 +else + if [ -e "$TARGETDIR"/"`basename "$FILE"`" ]; then + DATE=`date +%s` + echo file already exists, renaming to $FILE.$DATE + $MV "$FILE" "$TARGETDIR"/`basename "$FILE"`.$DATE + else + echo "$TARGETDIR"/`basename "$FILE"` + $MV "$FILE" "$TARGETDIR" + fi +fi diff --git a/sort-mails b/sort-mails new file mode 100755 index 0000000..27ff5f9 --- /dev/null +++ b/sort-mails @@ -0,0 +1,6 @@ +#!/bin/sh + +[ -f "$1" ] || exit 1 + +echo "Sorting $1 .." +cat "$1" | procmail && (echo removing "$1"; rm -f "$1") diff --git a/soundaemon b/soundaemon new file mode 100755 index 0000000..2b28966 --- /dev/null +++ b/soundaemon @@ -0,0 +1 @@ +netcat -p 37337 -l > /dev/sound/dsp diff --git a/soundlaut b/soundlaut new file mode 100755 index 0000000..ba6ee08 --- /dev/null +++ b/soundlaut @@ -0,0 +1,4 @@ +hmix -master 90 +hmix -pcm 90 +hmix -cd 90 +hmix -mic 0 diff --git a/spiegel-jans-saug-seite.sh b/spiegel-jans-saug-seite.sh new file mode 100755 index 0000000..13013d4 --- /dev/null +++ b/spiegel-jans-saug-seite.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +URL=http://www.schaustdu.de/ba/ + +# test1 +# curl http://www.schaustdu.de/ba/ | grep -i -e 'value=' -e 'href=' | sed s'/.*"\(.*\)".*/\1/' | grep -v saugen + +# test2 +# curl http://www.schaustdu.de/ba/ | grep -i -e 'value=' -e 'href=' | sed -e 's/"//g' -e 's/value=/href=/g' | sed 's/.*href=\(.*\)>.*/\1/' | sed 's/>.*//' | grep -v saugen + +# test3 - final + +DOCS=`curl http://www.schaustdu.de/ba/ | grep -i -e 'value=' -e 'href=' | sed -e 's/"//g' -e 's/value=/href=/g' | sed 's/.*href=\(.*\)>.*/\1/' | sed 's/>.*//' | grep -v -e saugen -e http -e mailto:` + +# go get them! +for doc in $DOCS; do + wget -c ${URL}${doc} +done diff --git a/ssh/eiche b/ssh/eiche new file mode 100644 index 0000000..8cee7bc --- /dev/null +++ b/ssh/eiche @@ -0,0 +1 @@ +ssh eiche -lroot diff --git a/ssh/marvin b/ssh/marvin new file mode 100644 index 0000000..cf1b072 --- /dev/null +++ b/ssh/marvin @@ -0,0 +1 @@ +ssh marvin -lroot diff --git a/ssh/ntbconny b/ssh/ntbconny new file mode 100644 index 0000000..7350c26 --- /dev/null +++ b/ssh/ntbconny @@ -0,0 +1 @@ +ssh ntbconny -lroot diff --git a/ssh/ozean b/ssh/ozean new file mode 100644 index 0000000..46fff61 --- /dev/null +++ b/ssh/ozean @@ -0,0 +1 @@ +ssh ozean -lroot diff --git a/sshto b/sshto new file mode 100755 index 0000000..544f50a --- /dev/null +++ b/sshto @@ -0,0 +1,33 @@ +#!/bin/sh + +# Standard: +thehost="creeper" +theuser="root" + +SSH="ssh" +OPTS="" + +# HOST +read -p "ssh host [$thehost] :" temphost +if [ -z "$temphost" ]; then + OPTS="$OPTS $thehost" +else + OPTS="$OPTS $temphost" +fi + + +# USER +read -p "user [$theuser] :" tempuser +if [ -z "$tempuser" ]; then + OPTS="$OPTS -l$theuser" +else + OPTS="$OPTS -l$tempuser" +fi + +# COMMAND +read -p "command: " thecmd +if [ -n "$thecmd" ]; then + OPTS="$OPTS \"$thecmd\"" +fi + +$SSH $OPTS diff --git a/start_pseudo_win b/start_pseudo_win new file mode 100755 index 0000000..6f69b65 --- /dev/null +++ b/start_pseudo_win @@ -0,0 +1,7 @@ +xsetroot -solid black +sleep 1 +wmsetbg -e computer/images/fun/windows95.jpg -s -b black +sleep 5 +wmsetbg -e computer/images/fun/screenshot-winxp2.jpg +sleep 5 +wmsetbg -a computer/html/darkpage/images/noms/bugs/bsod1.gif diff --git a/stplay b/stplay new file mode 100755 index 0000000..b181252 --- /dev/null +++ b/stplay @@ -0,0 +1,3 @@ +#!/bin/bash +export DISPLAY=:0.0 +/usr/X11R6/bin/xmms -p diff --git a/strip-squid-logs b/strip-squid-logs new file mode 100755 index 0000000..b628654 --- /dev/null +++ b/strip-squid-logs @@ -0,0 +1,3 @@ +cat $1 | tr A-Z a-z | egrep -v -e '.gif' -e '.png' -e '.jpg' -e x-javascript | \ +egrep -v 'schottelius.org' | egrep ' tcp_.*/200 ' +# | sed s/.jpg$//g | ed s/.png$//g diff --git a/suche_groesstes_dir b/suche_groesstes_dir new file mode 100755 index 0000000..0ca33f3 --- /dev/null +++ b/suche_groesstes_dir @@ -0,0 +1,10 @@ +#!/bin/sh +# Nico Schottelius +# find biggest directory +# + +DIR="" + +[ $# -eq 1 ] && DIR=$1 + +du $DIR | sort -g | less diff --git a/suche_grosse_verzeichnisse b/suche_grosse_verzeichnisse new file mode 100755 index 0000000..f51a1f7 --- /dev/null +++ b/suche_grosse_verzeichnisse @@ -0,0 +1,12 @@ +#!/bin/sh +# Nico Schottelius, 2004 +# find biggest directories + +#VDEV="/proc /sys /dev/pts /dev" # this is double +VDEV="/proc /sys" + +DIR=/ + +[ $# -eq 1 ] && DIR=$1 + +du --max-depth=1 "$DIR" | sort -n diff --git a/suche_vi_files b/suche_vi_files new file mode 100755 index 0000000..2e985ca --- /dev/null +++ b/suche_vi_files @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Nico Schottelius <nico@schottelius.(net|org)> +# Date: 04-Apr-2003 +# Last Modified: - +# + +if [ -z "$1" ]; then + file=. +else + file=$1 +fi + +find "$file" -name .\*.swp 2>/dev/null diff --git a/sync_data b/sync_data new file mode 100755 index 0000000..6876ce7 --- /dev/null +++ b/sync_data @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Author: Nico Schottelius <nico-linux@schottelius.(org|net)> +# Date: 27-Feb-2003 +# Last Modified: 27-Feb-2003 +# + +if [ $# -ne 2 ]; then + echo rsync '[import|export]' target + exit 1 +fi + +BACKUP_BASE="/tmp/backup/" +RSYNC="rsync -e ssh -abvz --backup-dir=$BACKUP_BASE --delete" + +# source is normally local +case "$2" in + wdt-home) + SRC=~/firmen/wdt/rsync/home/ + DEST=fs1:/home/nico/ + ;; + wdt-doc) + SRC=~/firmen/wdt/rsync/doc/ + DEST=fs2:/mnt/data/spezial/edv/doc/ + ;; + wdt-cgi) + SRC=~/firmen/wdt/rsync/cgi/ + DEST=fs1:/usr/local/apache/cgi-bin/ist-werte/ + ;; + h07-fki) + SRC=~/temp/IMPORTANT_DOCS/linux_tasks/2fpd/decr-f/fake_install/ + DEST=telmich@server1.h07.org:public_html/projects/fake-install/ + ;; + *) + echo "No such target" + exit 1 + ;; +esac + +# normally export +if [ "$1" = "import" ]; then + tmp=$SRC + SRC=$DEST + DEST=$tmp +fi + +$RSYNC $SRC $DEST diff --git a/taskgreper b/taskgreper new file mode 100755 index 0000000..993cce5 --- /dev/null +++ b/taskgreper @@ -0,0 +1,5 @@ +#!/bin/sh + +for proc in $@; do + ps ax|grep $proc|grep -v $0|grep -v "grep $proc" +done diff --git a/teecho b/teecho new file mode 100755 index 0000000..17f86dc --- /dev/null +++ b/teecho @@ -0,0 +1,20 @@ +#!/bin/sh + exec 3>/dev/tty + echo2() + { + echo "$@" 1>&2 + } + echo3() + { + echo "$@" 1>&3 + } + echo1() + { + echo "$@" 1>&1 + } + echo2 a b c 2>&1 >/dev/null + echo2 d e f >/dev/null 2>&1 + echo2 g h i | tr '[a-z]' '[A-Z]' + ( echo2 j k l; echo x y z ) | tr '[a-z]' '[A-Z]' + ( echo1 a1 ;echo2 b2; echo3 c3 ) >/dev/null + ( echo1 d1 ;echo2 e2; echo3 f3 ) | tr '[a-z]' '[A-Z]' diff --git a/telnrev b/telnrev new file mode 100755 index 0000000..6a36f37 --- /dev/null +++ b/telnrev @@ -0,0 +1,57 @@ +#!/usr/bin/perl -w +# von Bastian + +use strict; + + +#my $content=site_get ('shure-e2'); +#print $content; +#die; +my $bla; +my $num; + +if (defined ($ARGV[0])) { + if ($ARGV[0] =~ /^\+49(.*)/) { + $num = "0$1"; + } else { + print "Keine Deutsche Nummer!\n"; + exit 3; + } +} else { + exit 2; +} + + +#exit 0; +$bla=site_parse (site_get ($num)); print "(Ö)$bla\n"; + + + +#print $content; + +############################# + +sub site_get { + my $telnumber=$_[0]; + + my $site='http://www.dasoertliche.de/DB4Web/es/oetb2suche/home.htm?kw_invers='.$telnumber.'&main=Antwort&AKTION=START_INVERS_SUCHE&SEITE=INVERSSUCHE_V&Suchen.x=13&Suchen.y=7&s=2&rg=1&taoid=&si=04122017232940004122017232928003&SKN=0&SEITE=INVERSSUCHE_V&AKTION=START_SUCHE'; + + use LWP::Simple; + my $content = get("$site"); + $content =~ s/\n//g; + $content =~ s/\r//g; + return ($content); +} + +sub site_parse { + my $content = $_[0]; + my $list = ''; + if ($content =~ /Kein Teilnehmer gefunden:/) { + print "Kein Teilnehmer gefunden\n"; + exit 1; + } elsif ($content =~ /href="home.htm\?main=Detailansicht[^>]*">([^>]*)</) { + $list = $1; + } + + return "$list"; +} diff --git a/test-account b/test-account new file mode 100755 index 0000000..28a8e6f --- /dev/null +++ b/test-account @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Nico Schottelius <nico-linux@schottelius.org> +# Date: 21-Oct-2004 +# Last Modified: - +# + +PROGLIST="wget curl zsh vim irssi perl" + +for prog in $PROGLIST; do + [ `which $prog` ] || MISSING="$MISSING $prog" +done + +[ "$MISSING" ] || MISSING=" -" + +echo "Missing:$MISSING" + diff --git a/to_gpm b/to_gpm new file mode 100755 index 0000000..5581394 --- /dev/null +++ b/to_gpm @@ -0,0 +1,3 @@ +#!/bin/sh +cd ~/computer/sources/linux/gpm/cvstree/ +screen -q diff --git a/to_green b/to_green new file mode 100755 index 0000000..ff43797 --- /dev/null +++ b/to_green @@ -0,0 +1,3 @@ +#!/bin/sh +. /etc/sys/colors +echo -e $GREEN diff --git a/transeterm b/transeterm new file mode 100755 index 0000000..6b459f0 --- /dev/null +++ b/transeterm @@ -0,0 +1,7 @@ +colour="$1" + +OPTS="-title `basename $0` -trsb -tr -sh 100 -fg white -bg black -fade 50 -bw 0 +sb -sl 1000 -ls" + +[ "$colour" ] && OPTS="$OPTS -tint $colour" + +aterm $OPTS diff --git a/tunnelirc b/tunnelirc new file mode 100755 index 0000000..3cb2bcd --- /dev/null +++ b/tunnelirc @@ -0,0 +1,2 @@ +#!/bin/sh +#echo "/usr/local/bin/irssi -c localhost" | ssh schottelius.org -lnico diff --git a/umrechnung-nico.sh b/umrechnung-nico.sh new file mode 100755 index 0000000..c7ccbbc --- /dev/null +++ b/umrechnung-nico.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +WAEHRUNG="EUR DEM USD DKK GBP JPY CHF" + +for W in $WAEHRUNG +do + curl -s "http://de.finance.yahoo.com/m5?a=1&s=EUR&t=$W" | sed '/<\/td><\/tr><input name=c type=hidden value=0><\/table><input type=submit value=umrechnen><\/form>/{s/.*<td>\(.*\)<\/td><td><b>.*<\/b>$/\1/;s/,/./; s/\(.*\)/'$W,'\1\;/; q}; d' + + +# http://de.finance.yahoo.com/q?d=t&s=XAUUSD=X + +done diff --git a/update-hosts.debian b/update-hosts.debian new file mode 100755 index 0000000..3c92943 --- /dev/null +++ b/update-hosts.debian @@ -0,0 +1,6 @@ +hosts="eiche" + +for host in $hosts; do + ssh root@$host "apt-get update" + ssh root@$host "apt-get dist-upgrade" +done diff --git a/vfat_to_nfs b/vfat_to_nfs new file mode 100755 index 0000000..a5680e1 --- /dev/null +++ b/vfat_to_nfs @@ -0,0 +1,13 @@ +#!/bin/sh +# convert vfat permissions to normal ones.. + +if [ -d "$1" ];then chmod 0700 "$1" +else chmod 0600 "$1" +fi + +# could also be: + +#if [ -d "$1" ];then chmod og-x "$1" +#else chmod a-x "$1" +#fi + diff --git a/video_play b/video_play new file mode 100755 index 0000000..24c1f30 --- /dev/null +++ b/video_play @@ -0,0 +1,2 @@ +#!/bin/sh +mplayer -vo dga -fs "$@" diff --git a/wechsele-profil.sh b/wechsele-profil.sh new file mode 100755 index 0000000..348b64b --- /dev/null +++ b/wechsele-profil.sh @@ -0,0 +1,5 @@ +PROFIL=$1 + +[ $# -eq 1 ] || exit 23 + +ln -fs ~/.ssh/known_hosts.$PROFIL ~/.ssh/known_hosts diff --git a/welcome_greeting b/welcome_greeting new file mode 100755 index 0000000..29c6de4 --- /dev/null +++ b/welcome_greeting @@ -0,0 +1,23 @@ +# music +#greeting_intro_play & + +# used to start the sequence +ESC="\033" + +# used to end colors: +END="\033[m" + +BOLD="$ESC[m" +BLACK="$ESC[30m" +GRAY="$ESC[1;30m" +RED="$ESC[31m" +LIGHT_RED="$ESC[1;31m" +GREEN="$ESC[32m" + + +#MY_ECHO="echo -e" +MY_ECHO="echo" + +$MY_ECHO $BOLD$RED +cat ~/.loginart +$MY_ECHO $END diff --git a/wlan-sniff b/wlan-sniff new file mode 100755 index 0000000..46bebad --- /dev/null +++ b/wlan-sniff @@ -0,0 +1,5 @@ +#ifconfig wlan0 up +cd ~nico/temp/sniff +kismet_monitor +kismet_server +kismet_curses diff --git a/wlanctl-monitor b/wlanctl-monitor new file mode 100644 index 0000000..253c824 --- /dev/null +++ b/wlanctl-monitor @@ -0,0 +1 @@ +while true; do for i in `seq 1 11`; do wlanctl-ng wlan0 lnxreq_wlansniff enable=true channel=$i; done; done diff --git a/wterm_trans b/wterm_trans new file mode 100755 index 0000000..5b1cd31 --- /dev/null +++ b/wterm_trans @@ -0,0 +1 @@ +wterm -tr -ls -fg white diff --git a/x.home b/x.home new file mode 100755 index 0000000..528d9f7 --- /dev/null +++ b/x.home @@ -0,0 +1,17 @@ +killall xscreensaver + + +# irc +aterm -trsb -tr -sh 100 -fg white -fade 50 -bw 0 +sb -sl 1000 -tint blue -ls -e ssh ns & + +# mail +securemail && aterm -trsb -tr -sh 100 -fg white -fade 50 -bw 0 +sb -sl 1000 -tint red -ls -e mutt -f ~/Maildir/ & + +# icq +xterm -ls -e ssh ns & + +# opera +#/tmp/bla2/bin/opera & + +# browser2 +mozilla & diff --git a/x.wdt b/x.wdt new file mode 100755 index 0000000..ae569bd --- /dev/null +++ b/x.wdt @@ -0,0 +1,18 @@ +killall xscreensaver + + +# irc +aterm -trsb -tr -sh 100 -fg white -fade 50 -bw 0 +sb -sl 1000 -tint blue -ls -e ssh ns.schottelius.org & + +# mail +securemail && aterm -trsb -tr -sh 100 -fg white -fade 50 -bw 0 +sb -sl 1000 -tint red -ls -e mutt -f ~/Maildir/ & + +# icq +xterm -ls -e ssh ns.schottelius.org & + +# work +xterm -ls -e ssh root@debian & + +# opera +mozilla + diff --git a/xblender b/xblender new file mode 100755 index 0000000..45ea4c1 --- /dev/null +++ b/xblender @@ -0,0 +1,4 @@ +#!/bin/sh +Xwrapper -terminate :0.0 & +export DISPLAY=:0.0 +blender & diff --git a/xscript b/xscript new file mode 100755 index 0000000..3f13495 --- /dev/null +++ b/xscript @@ -0,0 +1,44 @@ +#!/bin/sh +# +# Author: Nico Schottelius +# Date: Sometime in Summer of 2k +# Last Changed: Wed Dec 13 13:42:45 CET 2000 +# Copying: >= GPL 2.0 +# Description: This script traces down what X and the +# XTerm are doing. I used that script for finding out, where +# my XTerm reads the LightYellow2 string from :) +# + +# used for the xterm +DISPLAY=":0.0" + +# What is the name of your X binary ? +X_BIN="XFree86" + +# where to write data +X_OUT=/tmp/xerrorn.`whoami` +XTERM_OUT=/tmp/xerrorn-xterm.`whoami` + +############################################################################### + + +# export DISPLAY for the xterm +export DISPLAY=:0.0 + +# start and trace X. +echo "Starting X" +strace $X_BIN -terminate :0 > $X_OUT 2>&1 & + +# start and trace XTerm. +echo "Starting XTerm" +strace xterm > $XTERM_OUT 2>&1 & + +# wait some seconds, until XTerm had all time to read all files. +echo "Sleeping some time..." +sleep 15 + + +# ending session. This should be enough data +echo "Stopping tracing..." + +killall $X_BIN diff --git a/xtightvncviewer.local b/xtightvncviewer.local new file mode 100755 index 0000000..667d08f --- /dev/null +++ b/xtightvncviewer.local @@ -0,0 +1,6 @@ +#!/bin/sh +# Do Mär 9 15:52:13 CET 2006 + +xtightvncviewer -encodings \ + "copyrect tight hextile zlib corre rre raw" \ + $@