#~ $Igpp: $Header: /user/garrod/RCS/Makefile,v 6.81 2008-04-29 17:02:12-07 garrod Exp garrod $ $ #~ $Ckg: $Header: /user/garrod/RCS/Makefile,v 6.81 2008-04-29 17:02:12-07 garrod Exp garrod $ $ #~ $Header: /user/garrod/RCS/Makefile,v 6.81 2008-04-29 17:02:12-07 garrod Exp garrod $ # DoubleHeader for RcsKeyword identification whether checked in or out # beginning to work on the OneMakefile - RefactorConsolidateSimplify # Refactoring: :%!uniq R=R#for cool thing below Use Revision not Version REV=$Revision: 6.81 $ rcs=/igpp/bin C=$(SSH) -f -X H=Header Q=-T $$i -ls -b 15 -sl 1024 -sb -fn 10x20 -fb 10x20 -n $$i -iconic # -ziconbeep 99 norm=echo binary;echo hash quit=echo quit BaseName=`basename $(PWD)` DirName=`dirname $(PWD)` noUCSD=sed -e 's,\.[Uu][Cc][Ss][Dd]\.[Ee][Dd][Uu],,g' HostName=`(hostname||/usr/bsd/hostname)|$(noUCSD)` I=/igpp/bin IB=/igpp/bin MarsLog=/net/marslog/mars.log NetCom=/net/com PD=$(DAT)/mailstats # my database PL=$(HOME)/.procmail/log # procmail's logfile PR=/usr/bin/mailstat # procmail's tool RESOLV=/etc/resolv SRC=$(NetCom)/src cache=--cache=/igpp/me/config.cache d=/dev/null lsof=$(IB)/lsof mailbox=/net/igppmail/garrod rdb=/usr/local/rdb/bin tickets=/net/tickets/??????/ticket OpenedTickets=/net/tickets/Opened/ticket ClosedTickets=/net/tickets/Closed/ticket MakeIt=$(MAKE) $(MFLAGS) gzip=$(IB)/gzip --best sudo=sudo -p "\# password for $(LOGNAME)@$(HostName): " #~ if not present, su, and make sudo='' the stuff TheDbs=/net/dbs# Where the really exist at HomeHost and others, including RCS HereDbs=$(TheDbs)# except where its ~garrod/Dat or /Volumes/Groups/dbs or ... default: ;grep "#~" $(HOME)/Makefile # Current projects are at the bottom: :.,/^$/m$ U=ucsd.edu WhereEver whereever: ;$(MakeIt) at-$(HostName) $(PWD) OneLiners oneliners: ;$(NameWindow) & cn # ASSIGNMENTS lumped in one place? null= >$d 2DevNull= 2>$d ToNull= $(2null) ToTarget= >$@ 2>&1 WHO=$(USER)@$(HOSTNAME) # Date processing expressions there should be no other matches for /date # RefactorDates ViPaster /^[^#]*date[^])= ] DATE=$(IB)/date D=`$(DATE) +"%Y%m%d.%H%M%S"` MONTH=`$(DATE) +"%m"` YM=`$(DATE) +"%Y%m"` YMD=`$(DATE) +"%Y%m%d"` HM=`$(DATE) +"%H%M"` ThisMonth=`$(DATE) +"%Y%m"` Tomorrow=`$(DATE) +"%Y%m%d" -d '1 day'`# NotWorking yesterday=`$(DATE) +"%Y%m%d" -d '-1 day'` YesterWeekDay=`$(DATE) +"%A" -d '-1 day'` #WeekDay=`$(DATE) +"%A"` # SeeAlso /WeekDays LastMonth=`$(DATE) +"%Y%m" -d '-1 month'` MonthLast=`$(DATE) +"%B%Y" -d '-1 month'` lastMonYr=`$(DATE) +"%b/%Y" -d '-1 month'` HM1=`$(DATE) +"%H%M" -d '1 hour'` thisMonYr=`$(DATE) +"%b/%Y"`# Note the format that apache is using for it's dates PlusTwoMinutes=-d '2 minutes' CRONT=\# %M %H %d %m %w CronTime=$(DATE) +"$(CRONT) bin/mash -V " DT=`dt` yesterday: ;echo export yesterday=$(yesterday) tomorrow: ;echo export tomorrow=$(Tomorrow) maillog=$(HOME)/.procmail/log.$(MONTH) poplog=/var/tmp/poplog-$(YM) # Keep those PoundSigns tightly attached HomeUser=garrod# The username HomeH=geek# 20050427 The host spinning HomeUser'shome directory HomeH=nerd# 20060604 The host spinning HomeUser'shome directory HomeH: $(HomeH) #~ do the Test properly HomeHost=$(HomeH).$U# The host fully qualified HomeHost: $(HomeHost) #~ do the Test properly HomeBase=$(HomeUser)@$(HomeHost)# my home directory account SshHomeBase=ssh $(HomeBase)# send a command to my homebase HomeRsync=--rsync-path=/igpp/bin/rsync HOST=meteora.$U # used nowhere yet -- probably didn't work: NotRcs=[^R][^C][^S] SHELL=$(HOME)/bash# if this doesn't work its POSIX, use alias make='make SHELL=/bin/sh' SHELL=/usr/local/bin/bash# if this doesn't work its POSIX, use alias make='make SHELL=/bin/sh' SHELL=/bin/bash# if this doesn't work its POSIX, use alias make='make SHELL=/bin/sh' .netscape/lock: # graph this better -rm $@ netscaper & # make a package to port to some place else netscape = .netscape/Makefile .netscape/*.html .netscape/cookies .netscape/pre* .netscape/bookmarks* # cde= .dtprofile .desk* .dt/* # vue= .vue # open= .open* X= .Xd* # wms= $(cde) $(vue) $(X) $(open) # window managers wms= $(X) rc= .*rc # all the rc commands - .acrorc .exrc .mailrc ... bash= .profile # 20040401 .bashrc .kshaliases csh= .cshrc # 20040407 .login .logout shells= $(bash) $(csh) # SecurityHole removed: 20031211 .rhosts sigs= .sig* vnc= .vnc/xstartup .vnc/passwd others= .wilytools $(vnc) $(sigs) .auxchestrc DOTS= $(shells) $(rc) $(wms) $(netscape) $(others) BINARIES = sun/* sgi/* hp/* x86/* SWP=wiki/MyCalendar #SpecialWikiPages ETC= etc/phone/*.n* # moved to $(DAT)/newnum as an edit/database DIRS = Bin $(ETC) cpr limbo java .pgp .ssh* DARS = Ban $(ETC) cpr limbo java .pgp .ssh* DAT=Dat# It has to be relative for the tarball and NoSpaces ENABLE=$(DAT)/ENABLE DATA = $(DAT)/newnum $(DAT)/urls $(DAT)/DataBases top: $(IB)/top bins:;ls -gladt $(BINARIES) dots:;ls -gladt $(DOTS) dirs: $(rdb) ;dir|sorttable -rn size|comma|table # dir/size dars:;ls -glad $(DARS) newport: # a new export file ready to go -/bin/rm porttar* $(MakeIt) porttar.gz portme: $(HomeH) notrash porttar.gz partme: $(HomeH) notrash parttar.gz porttar.gz: porttar;$(gzip) -c $? > $@ parttar.gz: parttar;$(gzip) -c $? > $@ porttar: ./ls $(DOTS) $(DIRS) $(BINARIES) $(DATA) (if [ ! -f $@ ];then tar -cf porttar Makefile;fi) tar -rf $@ $? # tar -tvf $@ | sort -n +0.16 # too verbose parttar: $(DOTS) $(DARS) $(BINARIES) (if [ ! -f $@ ];then tar -cf parttar Makefile;fi) tar -rf $@ $? # tar -tvf $@ | sort -n +0.16 # too verbose NewMakefile NewMake GetMake makefile getmake newmake newmakefile: not-igpp not-geek not-nerd -chmod u+w Makefile $(2null) $(WhatEcho) $(HomeBase)"'s " $(SCP) $(HomeBase):Makefile $(HOME)/Makefile wget=$(IB)/wget # on Solaris curl=/usr/bin/curl # on Macs clean: not-igpp not-geek not-home Trash NewMakefile not-nerd mv * .* Trash DotForward=.forward import: not-nerd not-igpp OnHomeHost unpack $(DotForward) NoSeeHome not-nerd date >> .imported -ln -s $(PrimaryHomeDir)/etc/RCS RCS GetZip: not-igpp #~ get the thing to unpack -chmod u+w porttar.gz $(2null) $(SCP) $(HomeBase):porttar.gz porttar.gz unprotect: GetZip # make sure I can overwrite everything -cat porttar.gz|$(decompress)|tar -tf - |grep -v " "|awk '{print $$1}'|xargs chmod u+w $(2null) decompress=gunzip --decompress unpack: unprotect cat porttar.gz|$(decompress)|tar -xf - ls rm -i porttar.gz TestHost=test "$@" = "$(HostName)" # are we on the right host? SshTo = cn & $(NameWindow) & $(SSH) -X garrod@$@ ;$(NameWindow) exited; dt ssh $@ just ended # #~ ViPaster: TwoLines /on named host ### :.,/^$/-1!sort -u|sort -f $(HomeHost) :: ;$(TestHost) aogshark : ;$(SshTo) arch ucsd : ;$(SshTo) arden : ;$(SshTo) augmatix : ;$(SshTo) BombaySapphire : ;$(SshTo) bombaysapphire : ;$(TestHost) cahuilla : ;$(SshTo) cajun : ;$(SshTo) clyde : ;$(TestHost) dhcp1 : NoHome ;$(SshTo) DropBox dropbox : ;$(SshTo) fizz : ;$(TestHost) flea : ;$(TestHost) FreeFall : ;$(SshTo) garrod.extern : garrod.extern.$U garrod.extern.$U: ;$(TestHost) geek : ;$(TestHost) # 20060615 moving to nerd grunt : ;$(TestHost) humu :: ;$(TestHost) igpntwk : ;$(TestHost) # 20070406 Why are some $(SshTo) ?? igpp : ;$(TestHost) IgppHome : ;$(SshTo) igpphome : ;$(TestHost) igpphome4 : ;$(TestHost) # where rsync runs and user dbs does his stuff igppserv : ;$(TestHost) igppviz IgppViz : igppviz.optiputer.net igppviz.optiputer.net: ;$(TestHost) JediMaster : ;$(SshTo) jedimaster : ;$(TestHost) mactest4 : ;$(SshTo) nerd : ;$(TestHost) noc : ;$(SshTo) noc : noc.$U noc.$U : ;$(TestHost) obsip : ;$(SshTo) pup : ;$(TestHost) SioPrism : ;$(SshTo) sioviz : ;$(TestHost) SioViz : sioviz sole : ;$(TestHost) # 20050427 moving all to geek sophomore : ;$(TestHost) sophomore.$U : ;$(TestHost) SunGod : ;$(SshTo) wolfpack : ;$(SshTo) # #~ ViPaster: TwoLines /Not on named host ### :.,/^$/-1!sort -u not-geek: ;test "geek" != "$(HostName)" # are we on the right host? not-humu: ;test "humu" != "$(HostName)" # are we on the right host? not-igpntwk: ;test "igpntwk" != "$(HostName)" # are we on the right host? not-igpp: ;test "igpp" != "$(HostName)" # are we on the right host? not-igppnet: ;test "igppnet" != "$(HostName)" # are we on the right host? not-igppserv: ;test "igppserv"!= "$(HostName)" # are we on the right host? not-nerd: ;test "nerd" != "$(HostName)" # are we on the right host? not-noc: ;test "noc" != "$(HostName)" # are we on the right host? not-plasma: ;test "plasma" != "$(HostName)" # are we on the right host? not-redhot: ;test "redhot" != "$(HostName)" # are we on the right host? not-sioviz: ;test "sioviz" != "$(HostName)" # are we on the right host? not-sole: ;test "sole" != "$(HostName)" # are we on the right host? not-stowe: ;test "stowe" != "$(HostName)" # are we on the right host? $(DotForward): not-noc # 20020827 moved awaynot-igpp echo garrod@noc.$U>$(DotForward) # 20070302 didn't obey not-noc echo ChrisGarrod@gmail.com>$(DotForward) # gotta love it mailbase: nerd ;bin/mailbase >> $(HomeMail)/database make.: #~ find out the default rules for make on this host $(MakeIt) -pf - < $d 2$(null) > $@$(HostName) who: garrod: ; test $(LOGNAME) = $@ cgarrod: ; test $(LOGNAME) = $@ core: -rm $@ ln -s $d $@ test: ;echo mv filter.log filter.$(YM).log onerun: FORCE # make sure only one make is doing this stuff if [ ! -f $@ ] ;\ then echo $$$$ >$@ ;\ else if [ "`cat $@`" = "$$$$" ] ;\ then echo then ;\ else echo somebody is already running onerun ;\ /bin/false ;\ fi ;\ fi FORCE: buttons: .twmrc ;grep "=.*:" $? #~ list button definitions in .twmrc OnHomeHost: #~ make sure we are on the host spinning the disk my home is on cd && df . |(fmt -1000||fmt 1000 1001)| grep -v "[^)]:" # an error here means you are on the wrong host # 20030801 epicenter was making too many lines port: nerd echo $(DirName) echo $(BaseName) echo $(PWD) find $(HOME) -name bin -type d -o -name [mM]akefile -type f -o -name RCS -type d -print # DEBUGGING CONTINUES APACE. rcsdirs: not-igpp dirs -ln -s $(HomeDir)/RCS RCS for i in $(DIRS);do if [ ! -d $$i ]; then ln -s $$i/RCS RCS;fi;done router: igpp -cd etc/router && $(MakeIt) table alogs=/export/igppweb/apache/logs newweblog: $(igppwebapachelog) cp $? $?.$(LastMonth) -grep $(lastMonYr) $?.$(LastMonth) > $?.tmp -grep $(thisMonYr) $?.$(LastMonth) >> $?.tmp mv $?.tmp $? chmod 666 $? $(gzip) $?.$(LastMonth) $(adir) $? newweberr: $(apacheerr) cp $? $?.$(LastMonth) -grep $(lastMonYr) $?.$(LastMonth) > $?.tmp -grep $(thisMonYr) $?.$(LastMonth) >> $?.tmp mv $?.tmp $? chmod 666 $? $(gzip) $?.$(LastMonth) $(adir) $? # Current mars log will have last month's info plus this month. # marslog.LastMonth will contain overlap, at least two months. newmarslog: #~ archive and tag the previous marslog (Cron to do this on the first) cp $(MarsLog) $(MarsLog).$(LastMonth) -grep $(LastMonth) $(MarsLog).$(LastMonth) > $(MarsLog).tmp -grep $(ThisMonth) $(MarsLog).$(LastMonth) >> $(MarsLog).tmp mv $(MarsLog).tmp $(MarsLog) chmod 666 $(MarsLog) $(gzip) $(MarsLog).$(LastMonth) $(adir) $(MarsLog) croncrap=$(HomeMail)/croncrap croncrap: igpp for i in `ls -t $(croncrap)*`;do ls -l $$i;elm -f $$i;read x;done bintar: igpp # this looks like old stuff, porttar has been the workhorse tar -cf $@ bin bln dat ls -alt $@* $(gzip) $@ ls -alt $@* CronTabs=$(HOME)/CronTabs CronTab =$(CronTabs)/$(HostName) CronTab cron crontab: CronTabs $(HOME)/Makefile CronTabs/A test -f $(CronTab) || cp -p $(CronTabs)/A $(CronTab) -if [ ! -f $(CronTab) ] ;\ then cp $@s/A $(CronTab) ;\ chmod +w $(CronTab) ;\ else \ crontab -l|diff $(CronTab) - ;\ co -l -q $(CronTab) ;\ crontab -l > $(CronTab) ;\ fi ($(CronTime) -d '2 minutes' || $(CronTime)) >>$(CronTab) vi + $(CronTab) -rcsdiff -b $(CronTab) ci -u -q -m"$(ID)" $(CronTab) chmod -w $(CronTab) crontab $(CronTab) -$(CronTime) RealClean realclean: clean /var/spool/cron/crontabs/garrod: diff $@ CronTabs/$(HostName) Trash: ;@$(MkIt) History:: ;@$(MkIt) # host cant see my real home $(DAT): ;@$(MkIt) # host cant see my real home $(DAT)/find: Dat ;@$(MkIt) # host cant see my real home Set: ;@$(MkIt) # host cant see my real home CronTabs: ;@$(MkIt) # host cant see my real home NoSeeHome: CronTabs History Set Tmp Tmp: ;ln -s /tmp $@ # the subdirs are needed after reboots TmpDat=Tmp/Dat TmpDat: Tmp/Dat TmpWiki: Tmp/wiki TmpTmp: Tmp/Tmp Tmp/Dat: Tmp ;@$(MkIt) Tmp/Tmp: Tmp ;@$(MkIt) Tmp/wiki: Tmp ;@$(MkIt) # #~ ViPaster TwoLines /for HostSpecific things to do. DoublePaster ### :.,/^$/-1!sort at-arch: at-fjord: at-flea: at-gadabout: at-garrod.extern.$U: at-igpp: #;ci -m"$(ID)" -jl * .* # the j means don't make new RCS/*,v at-igppnet: at-josh: # 20040404 maybe gone at-noc: ciscolog at-radar: at-sio: symlinks at-sioviz: at-sole: $(PWD) ;echo $@ $? at-t90: at-zion: # 20040404 home in GeodesyGroup at-obsip: # make this machine look like a level two or four unix box $(MountNfs) flea.$U:/export/local/igpp/rc /net/rc $(MountNfs) flea.$U:/export/local/igpp/com $(NetCom) $(MountNfs) flea.$U:/export/share/uniq /net/uniq mailstats: igpp $(PR) $(PD) maillog: mailstats $(PD): $(PL) ; $(PR) $(PL) >> $(PD) $(PL): # we want this to exist proc: procs #~ the procmail stuff procs: maillog .procmailrc .procmail/rc.testing .procmail/rc.maillists .procmailrc: .procmail/rc.testing: ;$(CheckOut) $@ .procmail/rc.maillists: set: ;set > $W/MakeSet #~ tell me what environment cron is using content: $(HomeMail)/executing ;-grep -v ^Content $? >> /net/igppmail/garrod ckg=$(ckgHOME)/Bin################### Relative for CronTab to work ckgHOME=$(HOME)######### Note, this is not always my PrimaryHomeDir adir=$(ckg)/adir gnot=$(ckg)/gnot InsertDash=$(ckg)/insertdash headline=$(ckg)/headline sorttbl=$(ckg)/sorttbl rename=$(ckg)/RenameSed NoTrunk=$(ckg)/NoTrunk WhatEcho=@$(ckg)/whatecho $(DAT)/Bln: Bin Makefile # recreate the database $(start) ls -l Bin $(prime) lsrdb $(pump) Column link path $(pump) sorttbl -u $(pump) gnot "^[ ./]" $(pump) $(rename) link program $(pump) $(rename) path SymLinks $(pump) $(finish) $(CheckOut) $(MoveThem) -$(ShowDiffs) $(CheckIn) $(CleanUp) $(DAT)/bln: ;cd Bin && $(MakeIt) bln $(DAT)/scripts: $(DAT)/bln Makefile # recreate the database $(start) (cd Bin && dir) $(prime) gnot "^[dl]" $(pump) $(finish) $(CheckOut) $@ mv $T $@ -$(ShowDiffs) $(CheckIn) $@ $(CleanUp) mount1=MountCom MountRc MountUniq $(PrimaryHomeDir) mount2=MountDbs MountTickets MountMagic mount3=MountTickets MountMars MountIgpp MountLogs MountCom: $(NetCom) ;$(MountNfs) flea.$U:/export/local/igpp/com $? MountDbs: $(HereDbs) ;$(MountNfs) nerd.$U:/export/igpp/root/dbs $? MountGarrod: /user/garrod ;$(MountNfsIfNeeded) nerd.$U:/export/igpp/garrod $? MountGeek: /net/igpp ;$(MountNfs) nerd.$U:/export/igpp $? MountIgpp: MountNerd MountNerd: MountIgppmail: /net/igppmail ;$(MountNfs) igpp.$U:/export/igppmail $? MountLogs: /net/logs ;$(MountNfs) nerd.$U:/export/igpp/root/logs $? MountMagic: /net/magic ;$(MountNfs) flea.$U:/export/share/uniq/Magic $? MountMars: /net/mars ;$(MountNfs) nerd.$U:/export/igpp/mac_help/MARS/Mail/Auto $? MountMarsbin: /net/marsbin ;$(MountNfs) nerd.$U:/net/igpp/mac_help/mars/bin $? MountNfs=$(sudo) mount -t nfs MountNfsIfNeeded=df | grep $? || $(MountNfs) MountRc: /net/rc ;$(MountNfs) flea.$U:/export/local/igpp/rc $? mounts: NotNis sudo $(mount1) $(mount2) $(mount3) MountSrc: /net/src ;$(MountNfs) nerd.$U:/export/src $? MountTickets: /net/tickets ;$(MountNfs) nerd.$U:/net/igpp/mac_help/MARS/Tickets $? MountUniq: /net/uniq ;$(MountNfs) flea.$U:/export/share/uniq $? getprogram: #~ from a remote host, get the requested things in bin. echo which program? (read x && chmod +w Bin/$$x;$(SCP) $(HomeBase):bin/$$x Bin/$$x) Hset: ;test "$H" != "" # H may be unset or default Oset: ;test "$O" != "" #~ OperatingSystem type Vset: ;test "$V" != "" #~ VLAN as in V=39 Pset: ;test "$P" != "" #~ Board/port as in P=3/26 Nset: ;test "$N" != "" # N may be unset or default Ndir: Nset ;test -d "$N" # N must be a directory that exists Nfile: Nset ;test -f "$N" # N must be a file that exists PLAN9set: ;test "$(PLAN9)" != "" # Decide where to put it: export PLAN9= PLAN9dir: ;test -d "$(PLAN9)" || mkdir $(PLAN9) NoTrash notrash: CleanUp CleanUp: betterTrashCollection betterTrashCollection: Trash trash # OnceAndOnlyOnce mkdir Trash/$$$$ && mv trash Trash/$$$$/trash mv Trash trash mkdir Trash chmod a+rw Trash mv trash Trash ln -s Trash trash rm -rf Trash/trash && mkdir Tmp/Tmp Tmp/wiki Tmp/Dat xterms: ;psgrep xterm|grep [0-9][0-9][0-9]:|killthem -24 xterm2: ;$(ckg)/psgrep xterm|grep [0-9][0-9]:[0-9][0-9]|$(ckg)/killthem -24 BadIdea:# this attempt for fixups broke the sym links and left three copies lying around perl -p -i.bak -e 's.$(IB)/perl.`which perl`.g' Bin/* perl -p -i.bak -e 's.$(IB)/gawk.`which nawk`.g' Bin/* path: ;echo $(PATH)|sed -e 's/:/ /g' # hack to get around Unix's fatal flaw. Where did sysadmin put $#!+ # 20010918 refactoring the ln -s code -- it could be made smarter /ln.-s # three or five other ln.-s exist probably due to misunderstanding of graph fixups: symlinks #~ try to fix up stuff that isnt yet portable MakeLink=-ln -s $? $@ # allow existing link to not cause trouble symlinks: Bin/gawk Bin/perl Bin/less Bin/awk Bin/awk: /bin/nawk ;$(MakeLink) Bin/gawk: /usr/local/bin/gawk ;$(MakeLink) # on the cray Bin/perl: /usr/local/bin/perl ;$(MakeLink) Bin/less: /usr/bin/more ;$(MakeLink) # found here on cray $(IB)/top: $(IB)/newtop;ln -s $? Bin/top # not yet refactored trash: Trash;ln -s Trash trash xterm: ;ln -s `which xterm` Bin/xterm DataBases: # I ran out of inode quota on the cray cd Bin && ls -l|grep -e "-..database$$"|awk '{print $$9}' noDataBases: # I ran out of inode quota on the cray cd Bin && /bin/rm `ls -l|grep -e "-..database$$"|awk '{print $$9}'` ID=$D $(tickenv) $(WHO) $(REV)# dont put the quotes here cimsg: #~ print the message that ci plans to put on -m echo "$(ID)" ci -u -m"$(ID)" Makefile ########## ~/PATH/Makefile l=[a-z]* L=[A-Z]* 5: $(rdb) #~ show md5 clustering md5 *|5md|headline md5 host|sorttbl|onemany PSGREP=if ! ps -auwwx;then ps -eaf;fi|egrep -e PS: .force ;$(PSGREP) "$C" > $@ .force: CoreWindows=nerd noc epicenter flea icemac redhot wolfpack grunt clyde geek humu sioviz igpntwk nerd igpphome igpp sioprism ## the paster below gives one for every level two and above machine. # NOTE more debugging needed, the 1000 truncates around node loch #Gyyp!!(echo CoreWindows=;cd $q&&ls -d $l)|sed -e 's.lost+found..'|fmt -1000 NewWindows newwindows: ;$(NameWindow) & while read x;do $(MakeIt) -s windows CoreWindows=$$x;done MoreWindows morewindows: ;$(NameWindow) & while read x;do $(MakeIt) -s windows CoreWindows=$$x;done MoreWindows: morewindows ticklauncher: psgrep $@ $(NameIt) $@ -b & tarlist: $(DAT)/porttar $(DAT)/porttar: porttar tar -tvf $? |Bin/tarrdb >$@ showdiff $@ | sorttbl path when ci -l $@ TraceRoute TraceRouter tracerouter: cn & $(NameIt) $(CheckInOut) $(routes) clear wides $(routes)|t2l $(NameWindow) & while read x ;\ do echo vi +?$$x $(routes) ;\ vi +?$$x $(routes) ;\ clear ;\ wides $(routes)|t2l ;\ done echo now tracing $B/tracerouter bigmama routes=$(DAT)/tracerouteing tracer: tracerouter watch-marslog: $(MarsLog) n $(MarsLog)& cn & tail -f $(MarsLog)|sed -e 's,.*ppid [0-9]*;,,' -e 's,;TICKETING,,' $(DAT)/tarlist: porttar tar -tvf $? |tarrdb netstat: netstat -i |\ 2tab -gf" *" |\ tail +2 |\ headline Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll ciscolog: noc ls -lt /var/log/cisco wc /var/log/cisco tail -f /var/log/cisco |\ gnot MLS INVALID_RP_JOIN %SEC- 6-IP[A]CCESSLOGP: ljpro-som-e0-canprev-229-1 %AT-6-NODEWRONG: SNMPD_AUTH_FAILUR %SYS-4-SNMP_WRITENET # :w # :! $(SSH) garrod@noc rm Makefile # :! $(SCP) Makefile garrod@noc:Makefile EditList=$(DAT)/jobcard calendar $(DAT)/daybook $(DAT)/checks $(DAT)/Greetings edits: $(EditList) # most of the edit things are left locked $(adir) $(elist) ci -l -m"$(ID)" $? # Note the paster below shows that fmt doesn't reformat lines beginning with a dot # yyp!!bln edit|fmt -1020|sed -e 's/^/elist=/' elist=GpsBatteries Greetings LinesOfCode NOTES Notes PlanNine SearchEngines Stack VncCrashed advisors arch arpqsdelta badbins bamboo bandwidth batt battery bike birds blooming broken button calendar cddi chem class commute convergence datasize datastructure daybook filter.errors gigabit gone gps grandma haiku honda hubsandswitches idea ideas jobcard keirsey lap lunch mach10 madden mark mdf meeting missm mkfile netadv networks onloan os85 p9man pacbell partits pasteme pilot priorities program programs psswrd quicken quotes rdf run sprint sshok storehouse student subscriptions tea temp thanksgiving tids timesheet todo tomato toolusage toolused ttys upgrade urls voicemail william wireless wishlist yoga /tmp/.X11-unix: Makefile find $@ -ls | findrdb $(TouchIt)/$? || $(sudo) chmod a+w $@ VncGeometry=-geometry 987x650 # size it so it fits on BombaySapphire without a scroll bar VncDir=$(HOME)/.vnc VncServer vncserver: $(IB)/vncserver Makefile /tmp/.X11-unix $(HOME)/.vnc -rcs -l $(VncDir)/`hostname`*g -ci -q $(VncDir)/`hostname`*g -rm /tmp/.X11-unix/*[1-9] $(VncDir)/`hostname`*pid vncserver $(VncGeometry) & sleep 15 tail -f $(VncDir)/`hostname`:*log & sleep 30 $(LU) echo maybe you need to $(MakeIt) VncWork H=`hostname` VncServer dtwm: /usr/dt/bin killit wm & $?/dtsession & sleep 10 && $?/dtwm UnZip=gzcat $? >$@ # 20010528 gotta have ssh asap everywhere on the net. ssh: ssh.gz ssh1 ssh2 anonymous=echo ftp;echo $(EMAIL) EMAIL=garrod@$U ftp.ssh.org: ;($(anonymous); echo dir pub/ssh;echo quit)|ftp $@ >$@ ssh.gz: ftp.ssh.org ;grep "gz$$" $? SSH1=ssh-1.2.31 SSH2=ssh-2.4.0 ssh1: $(SSH1)/config.h ;cd `dirname $?` && $(MakeIt) install ssh2: $(SSH2)/config.h ;cd `dirname $?` && $(MakeIt) install $(SSH1)/config.h: $(SSH1)/README ;cd `dirname $?` && ./configure $(cache) $(SSH2)/config.h: $(SSH2)/README ;cd `dirname $?` && ./configure $(cache) $(SSH1): $(SSH1).tar ;$(UnTar) $(SSH2): $(SSH2).tar ;$(UnTar) $(SSH1).tar: $(SSH1).tar.gz ;$(UnZip) $(SSH2).tar: $(SSH2).tar.gz ;$(UnZip) getit=($(anonymous);$(norm);echo cd $?;echo get $@;$(quit)) # learn something new. After the target exists, $? is not pub/ssh! # thus it does make the ftp connection, but gets nothing faster. $(SSH1).tar.gz: pub/ssh ;$(getit)|ftp ftp.ssh.org $(SSH2).tar.gz: pub/ssh ;$(getit)|ftp ftp.ssh.org pub/ssh: wikidat: for i in "" 1 2 3 4 5 6 7 8 9 ;\ do for j in $(Digits) ;\ do get plan9.bell-labs.com /wiki/plan9/$$i$$j/history.html ;\ done ; done >$@ wikidata: wikidat $(CleanUp) $(start) cat $? $(prime) egrep "^.(Ti|li|br)" $(pump) sed -e 's/
  • / /' $(pump) sed -e 's., . .' $(pump) sed -e 's. (. .' $(pump) sed -e 's,).*,,' $(pump) headline filename when who ip $(pump) cat $(pump) $(finish) $(MoveThem) $(CheckIn) $(CleanUp) start=echo $T.$$$$ >$T.out # first stage of the pump finish=cat > $T $(in) # endpoint of a pumping process CheckOutIn=$(ckg)/checkoutin bootptab: igpntwk resize n igpntwk bootpd & $(CheckOutIn) $(NetCom)/dat/bootptab cd /net/rc && $(sudo) make /etc/bootptab -grep bootp /var/adm/messages n igpntwk bootpd $(SshHomeBase) "cd $(TheDbs)&&tickenv=$$tickenv tickname=\"$$tickname\" $(MakeIt) -ks bootptab" HMF=$(HOME)/MakeFiles/$@ Preserve=test -f $(HMF) && chmod +w $(HMF) ; cp -p $? $(HMF) sPreserve=$(SCP) garrod@igpphome:$? $(HMF) nets=SysAdmin dbs logs mars marslog marsbin rc tickets uniq # 20041112 not igppweb lplog # magic -- this is TheSource via SymLinks of all the magic in the OneNis SysAdmin: /net/Groups/sysadmin/Makefile ;$(Preserve) dbs: $(TheDbs)/Makefile ;$(Preserve) logs: /net/logs/Makefile ;$(Preserve) lplog: /net/lplog/Makefile ;$(Preserve) magic: /net/magic/Makefile ;$(Preserve) mars: /net/mars/Makefile ;$(Preserve) rc: /net/rc/Makefile ;$(Preserve) # gone src: /net/src/Makefile ;$(Preserve) uniq: /net/uniq/Makefile ;$(Preserve) igppweb: /net/igppweb/Makefile ;$(Preserve) localweb: /net/igppweb/LOCAL/Makefile ;$(Preserve) marslog: /net/marslog/Makefile ;$(Preserve) marsbin: /net/marsbin/Makefile ;$(Preserve) tickets: /net/tickets/Makefile ;$(Preserve) other= # freebsd named: flea /var/spool/named/Makefile ;$(Preserve) freebsd: # no more, use this file exclusively. $(SCP) garrod@garrod.extern.$U/root/Makefile $@ # 20010607 harvest some of my better works. makefiles: #~ send all the makefiles found around here to me find / -name [mM]akefile -print Makefiles MakeFiles: $(nets) $(other) $(fleas) $(adir) $(HOME)/MakeFiles/* cd $(HOME)/MakeFiles && ci -l `ls | grep -v RCS` TestHosts=arad3d sophomore noc cgarrod@igpphome epicenter pushtest: Nfile #~ push a test command (In N) to the testing hosts for i in $(TestHosts) ;\ do dt $$i $$N ;\ $(ssh) <$d $$i "finger|onhead|retrim" | cat ;\ done # 20010619 less less=less_4.56# current version lessEND=$(less)/less.man# last file on current tgz less.tar.gz: (echo cd /pub/tools/unix/less ;\ echo binary ;\ echo get $@ ;\ echo quit )\ |ftp vic.cc.purdue.edu less.tar: less.tar.gz ;gzcat $? >$@ less.tarend: less.tar $(UnTar) $(tarEND) less: less.tarend $(lessEND) $(adir) $? cd $(less) && ./Configure solaris cd $(less) && $(MakeIt) $(lessEND): $(less).tarend $(less).tarend:$(less).tar $(UnTar) $(tarEND) TelnetTo = cn & psswrd -g $@ & $(NameWindow) & telnet $@ ; dt TelnetTo $@ just ended MDF MedFly medfly mdf: ;$(TelnetTo) RDF RedFox redfox rdf: ;$(TelnetTo) GrayFox grayfox: ;$(TelnetTo) KitFox kitfox: ;$(TelnetTo) GrayFox = 172.16.154.194 grayfox: $(GrayFox) KitFox = 172.16.154.195 kitfox: $(KitFox) igpp-aftac-gw:: ;$(TelnetTo) NowAt: ;false #~ This used to run on our mail server igpp, but the SysAdmins # wanted me to go elsewhere mail: NowAt noc pup igpp # I've moved this to Pup for the most part cn & while $(SleepSecond);do bin/bigmail;done bigmail BIGMAIL: BigMail BigMail:;tickname=" $@" $(XT) 84x32+59+-13 & xmodmap: xmodmap -pke |\ gnot =$$ |\ sed -e 's/keycode *//' -e 's/ = / /' |\ headline key $(HostName) >$(DAT)/$@.$(HostName) ci -l $(DAT)/$@.$(HostName) cronput: CronTabs cat CronTabs/$(HostName) | crontab netscaper: .netscape/lock cn & namewindow Urloading & urloading # 20010918 refactoring the one liners urloading: ;$(XT) 96x4+923--5 -e $@ & croncheck:;crontab -l|diff - CronTabs/$(HostName) epachedb: /net/logs/epache-log bin/epache # for the nimby virus, but awk will be fine retrospectlog: $(DAT)/retrospectlog Makefile $(DAT)/retrospectlog: /net/logs/retrospectlog grep -i garrod $? |\ tr '\322\323' '||' |\ awk -F"|" '{print $$2" "$$3}' |\ sort -u |\ headline file error |\ cat - >$@ # not portable FMT="%i\t%k\t%m\t%n\t%u\t%g\t%s\t%TY%Tm%Td.%TH%TM%TS\t%p\t%l\n" $(DAT)/myfiles: Makefile . $(MakeOut) $(prime) find . -ls $(pump) bln/findrdb $(pump) mon.dy.yrhm when inode bk prot ln owner group size mon dy yrhm path l link $(pump) $(EndPumping) $(CheckOut) $@ $(MoveThem) -$(ShowDiffs) $(CheckIn) $@ $(CleanUp) EarthQuakes: TmpWiki wiki/EarthQuakes QuakePage=http://www.data.scec.org/recenteqs/Quakes/quakes0.html Tmp/QuakePage: .force ;$(WgetIt) $(QuakePage) wiki/EarthQuakes: Tmp/QuakePage #~ from a pshearer homework assignment -$(CleanUq) $(MakeOut) $(StartPumping) grep recenteqs.*recenteqs $(pump) striphtml $(pump) sed -e 's/[()]//g' $(pump) # 20030506 Why the Q? 20041104 Quarry on Mag 2tab -gf' *' $(pump) headline map mag date time LatitudeLongitude depth km KM mi MI dir of where $(pump) sed -e 's/N /nw/' $(pump) # 200428 LatitudeLongitude !! RegularExpressions sed -e 's/W//' $(pump) # 20030506 found the bounds sed -e 's/ / /13' $(pump) # here is a place that sed -e 's/ / /13' $(pump) # uniq would ReFactor wrongly sed -e 's/ / /13' $(pump) # except for the stuff sed -e 's/ / /13' $(pump) # I have put into the Comments sed -e 's/ / /13' $(pump) # town of Big Bear Lake, CA Column date time LatitudeLongitude depth mag km mi dir where $(pump) datefix -2 $(pump) sed -e '1s/when/DateStamp/' $(pump) sed -e 's/ *$$//' $(pump) sed -e 's/Q / /' $(pump) # QuarryNear and the Q sed -e 's/Mt\./Mount/' $(pump) sed -e 's/Mtn\./Mountain/' $(pump) sed -e 's/ Lake dam/LakeDam/' $(pump) # Castaic Lake damCalifornia sed -e 's/Pt\./Point/' $(pump) sed -e 's/Res\./Reservoir/' $(pump) sed -e 's/Is\./Island/' $(pump) perl -p -e 's/([A-Z][a-z]*) ([A-Z][a-z]*) ([A-Z][a-z]*) ([A-Z][a-z]*) *,/$$1$$2$$3$$4/go' $(pump) perl -p -e 's/([A-Z][a-z]*) ([A-Z][a-z]*) ([A-Z][a-z]*) *,/$$1$$2$$3/go' $(pump) perl -p -e 's/([A-Z][a-z]*) ([A-Z][a-z]*) *,/$$1$$2/go' $(pump) sed -e 's/, AZ/Arizona/' $(pump) sed -e 's/, CA/California/' $(pump) sed -e 's/, NV/Nevada/' $(pump) sed -e 's/town of/TownOf/' $(pump) sed -e 's/downtown/DownTown/' $(pump) sed -e 's/Probable.quarry.explosion//' $(pump) sed -e 's/Quarry near/QuarryNear/' $(pump) sed -e 's/ CA$$/ CA/' $(pump) $(EndPumpingAndMoveThem) $(AddIdTag) $(AddLine) DataFrom' '$(QuakePage) $(AddLine) SeeAlso' 'EarthQuakeTowns -$(ShowDiff) $@ | gnot "^<" ' \? ' | Row mag ge 4 | $(ReTrim) #$(LockIn) $(SixOhSixIt) $(CleanUp) rm $? mytix: ;Bin/cn `ticklook "^[0-9]*.g"|first|headoff` fping: ;fping `(ypcat hosts || cat /etc/hosts ) | 2nd`||: arpsend: fping ;arp -a|mail -s /net/magic/arps/$(HostName) garrod@igpp SetClock NtpDate clock ntpdate setclock date: sudo time #~ sudo to get the sudo past passwd time: /net/rc/Makefile ;dt $(HostName) &&$(sudo) $(MakeIt) -f $? ntpdate && dt $(HostName) # Purpose: if a makefile does not exist, use the one at $HOME # mymake=if [ ! -f Makefile ];then $(MakeIt) -f $(mymakefile);else $(MakeIt) target:;echo $(MakeIt) # 20070608 discovered that sole stopped doing this about 400 days ago. Humu now advac: $(TheDbs)/vacationdb;$(ckg)/addaline $? `$(DATE) -d +600days "+%Y%m%d %A"` "" xloads xload: ;for i in 0 1 2 3 4 5;do export DISPLAY=$(HostName):1$$i.0;xl;done vt: #~ see what this host is doing with its vncserver psgrep vnc ls -lt .vnc/`hostname`*.log tail .vnc/`hostname`*.log homelook: Nfile #~ look in my homes on other hosts for i in $(OtherHomes);do dt $$i;$(ssh) $$i $(adir) $N | table; done zinger:zingers zingers:;tickname=$@ $(XT) 88x7+-7--10 +sb & XT=xterm -name xterm -T $@ -fn 10x20 -sl 1000 -geometry ## I had a file named lplog #!!adir lplog #prot ln owner group size mon dy yrhm path l link #---- -- ----- ----- ---- --- -- ---- ---- - ---- #-rw-r--r-- 1 garrod staff 321 Mar 17 2000 lplog LOGS=*.log raw: Makefile # get a raw listing of when a printer was used by whom for how many pages grep printed.pages $(LOGS) |\ gnot " 0" |\ 2tab -f'%%\[' |\ 2tab -f"\; " |\ 2tab -f".log:" |\ awk '{print $$2" "$$3" "$$4" "$$1" "$$7" "$$11}' |\ datefix |\ headline when printer who count |\ cat - >$@ SendMake sendmake: ;mailx -v $(TargHost) On2TargHost=>$(2TargHost) vncroom: #~ authentication fails when all 60 file handles are used up $(sudo) date $(sudo) $(lsof) | gnot "^Xvnc"|greplist `$(sudo) $(lsof) |grep Xvnc|grep 6.u|onhead|colontabs|11th` |killthem floppy: /floppy /floppy: /dev/fd0 #~ on FreeBSD $(MakeDirIfNeeded) -$(sudo) umount /$@ $(sudo) mount -t msdos $? /$@ cdrom: /cdrom /cdrom: /dev/acd0c $(MakeDirIfNeeded) $(sudo) /sbin/mount_cd9660 $? $@ summarize=cd `dirname $@` && $(MakeIt) Summary # ViPaster / MagicSummaries # ViPaster :.,/^$/-1!sort # not yet /net/magic/patch/Summary: /net/uniq/$l/patch ;$(summarize) /net/magic/archi/Summary: /net/uniq/$l/archi ;$(summarize) /net/magic/arps/Summary: /net/uniq/$l/arps ;$(summarize) /net/magic/crontab/Summary: /net/uniq/$l/crontab ;$(summarize) /net/magic/dfa/Summary: /net/uniq/$l/dfa ;$(summarize) /net/magic/domain/Summary: /net/uniq/$l/domain ;$(summarize) /net/magic/ftpdata/Summary: /net/uniq/$l/ftpdata ;$(summarize) /net/magic/imnext/Summary: /net/uniq/$l/imnext ;$(summarize) /net/magic/last/Summary: /net/uniq/$l/last ;$(summarize) /net/magic/netstati/Summary: /net/uniq/$l/netstati ;$(summarize) /net/magic/newmachine/Summary: /net/uniq/$l/newmachine ;$(summarize) /net/magic/ps/Summary: /net/uniq/$l/ps ;$(summarize) /net/magic/x/Summary: /net/uniq/$l/x ;$(summarize) # T14597 TIMEZONE archi arps crontab dfa domain ftpdata imnext # inetd interfaces last lastreboot localdisks magic makedbm messages net # netstati netstatn netstatr netstats newmachine nfsstat nmap nodename # ntpdate ps sendmail.cf setgid setuid shadow showmounte showprods sshd # syslog toplist ulimit uname unamer unames uptime usrlocalbin version.bash # version.elm version.emacs version.locate version.lsof version.make # version.sendmail version.ssh version.stty vmstat whichif workgroup # ypwhich ypwhichm ypwhichx #20001009 ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/lsof.tar.gz # LSOF=lsof_4.64# 20020718 LSOF=lsof# it seems that I'm getting the latest to start with LSOFEND=$(LSOF)/lsof.man# last file on current tgz lsof.tar.gz: (echo cd /pub/tools/unix/lsof ;\ echo binary ;\ echo get $@ ;\ echo quit )\ |ftp vic.cc.purdue.edu lsof.tar: lsof.tar.gz ;gzcat $? >$@ #lsof.tarend: lsof.tar $(UnTar) $(tarEND) UnTar=tar -xf $? tarEND=tar -tvf $? | awk '{print $$NF}' | tail -1 >$@ lsof: lsof.tarend $(LSOFEND) $(adir) $? cd $(LSOF) && ./Configure solaris cd $(LSOF) && make $(LSOFEND): $(LSOF).tarend $(LSOF).tarend: $(LSOF).tar $(UnTar) $(tarEND) BASH=bash-2.05b.tar.gz# 20020717 same day service? login: ;namewindow login mailpop=$(mailbox).pop # 20070302 the commenting out below looks like a prusso thrash how long ago? #testprocmail: # 20020731 tails already running from a previous test # tail -f $(mailbox) & # tail -f $(maillog) & # cp $(DotForward).procmail $(DotForward) # tellme testing $@ # sleep 10 # chmod +w $(DotForward) # /bin/rm $(DotForward) #forproc: $(mailbox) # 20020804 learned over the weekend. # mv $(mailbox) $(mailpop) # formail -c -q- -s procmail <$(mailpop) # rm $(mailpop) #formail formmail: forproc pathchange: /usr/local/bin # for cut and paste. echo 'export PATH=$?:$$PATH' #RESOLV.CONF=$(RESOLV).conf #resolvers: resolv.sdsc resolv.ucsd ;$(adir) $(RESOLV) #resolv.sdsc: $(RESOLV).sdsc ;$(sudo) $(CopyPreserve) $? $(RESOLV.CONF) # 20030506 why is all this resolving commented out? # 20030506 that is NotMyStyle 20030728 SurprisedAgain #resolv.ucsd: $(RESOLV).$U #$(RESOLV).sdsc: # echo >$@ search sdsc.edu # echo>>$@ nameserver 198.202.75.26 # echo>>$@ nameserver 132.249.40.25 # echo>>$@ nameserver 132.249.20.25 #$(RESOLV).ucsd: $(RESOLV).$U #$(RESOLV).$U # echo >$@ domain $U # echo>>$@ nameserver $(HS).154.202 # echo>>$@ nameserver $(HS).1.52 # echo>>$@ nameserver $(HS).152.7 #named.cache: # dig . ns @ns.internic.net #expn: Nset Host # (echo expn $N;sleep 5;echo quit)|telnet $H 25 NetErrors neterrors: /net/magic/netstati (cd $? ;\ sorttable -rn ierrs > $@;fi" trashlist: ; find trash Trash -ls|findrdb # WhichWay? geek is now the primary repository, but sometimes I'll go this way # WhichWay? nerd is now the primary repository, but sometimes I'll go this way MakefileBackup: sophomore Makefile $(ssh) $(HomeHost) rm MakeFiles/RCS/sophomore,v $(SCP) RCS/Makefile,v $(HomeHost):MakeFiles/RCS/sophomore,v $(ssh) $(HomeHost) rm MakeFiles/sophomore $(SCP) Makefile $(HomeHost):MakeFiles/sophomore E=echo>>$@ /etc/hosts: root sophomore -rm $@ $E "# This file is created by MyMakefile" $E "10.0.1.1 airport" $E "10.0.1.2 two" $E "10.0.1.3 three" $E "10.0.1.4 four" $E "10.0.1.5 five" $E "10.0.1.6 six" $E "10.0.1.7 seven" $E "10.0.1.8 eight" $E "127.0.0.1 localhost.$U localhost local" $E "132.239.154.193 gw" $E "132.239.154.208 sophomore" $E "137.110.9.209 garrod.extern bolt charger martha laelia" $E "172.16.154.208 sophomore" $E "172.16.154.206 martha" eicar.com: WorkInProgress $E "X5O!P%@AP[4\PZX54(P^)7CC)7}$$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$$H+H\*" NameIt=export tickname=$@&& $(NameWindow)@$(HostName) & InfPass="inferno:*:10003:30::0:0:Inferno:/c/inferno:/bin/bash" UnixInferno: ImRoot echo working if ! grep inferno /etc/master.passwd ; then \ echo>>/etc/master.passwd $(InfPass) \ ; fi if ! grep inferno /etc/group ; then \ echo>>/etc/group "inferno:*:30:garrod" \ ;fi vipw AmIroot: ;id | ! grep uid=0.root AmInotRoot: ;id | grep uid=0.root ImRoot: ;id | grep uid=0.root root: AmIroot echo this is a target you have to use sudo !! echo due to redirection false display: displayset ;echo $(DISPLAY) vf: -psgrep wm|killthem $(vf) solarium:1 twm & mytrash: sudo Trash trash $(sudo) chown -R garrod Trash trash $(sudo) chmod -R o+rwx Trash trash WPID=$(HOME)/.thttpd.pid webserver WebServer: $(WPID) nowebserver # this was on FreeBsd $(sudo) thttpd -l $(HOME)/weblog -c /cgi/* -d $(MyWikiFiles) -i $(WPID) -r $(WPID): sudo nowebserver: $(WPID) -$(sudo) kill `cat $?` v=vncviewer -passwd .vnc/passwd vf=$(v) -fullscreen SudoThere sudothere: Host ($(NoEcho);$(ssh) $H $(sudo) date;$(Echo)) NoEcho=stty -echo Echo=stty echo # NoEcho doesn't work when sshed in. VncWork vncwork: Host SudoThere $(ssh) $H '$(LU);uptime;sudo chmod a+w $(XU);$(LU)' XU=/tmp/.X11-unix LU=ls -dl $(XU) DeskHost=solarium.$U VdeskTop=$(DeskHost):2 vncssh: notwm nocaps SshViewer twm notwm: ;psgrep twm|killthem sshviewer SshViewer: Xhost ;$(ssh) -X $(DeskHost) '$(vf) $(VdeskTop)' Xhost: ; xhost $(DeskHost) wired notwireless: wire sophroute unwired: radio nowire ucsdroute onair: radio # WalledGarden Unused # CheckExport: Host ShowExport Nset MountPoint # WalledGarden Unused # MountPoint: sudo Nset /net/$N # WalledGarden Unused # ShowExport: Host ;showmount -e $H $(DAT)/gps: $(DAT)/gps.txt -$(CleanUq) # remove when debugged $(MakeOut) $(StartPumping) # just cats prereq's nocomment $(pump) tr -d '[]()' $(pump) gnot E.0.0000 $(pump) sed -e 's/ SSID /SSID/g' $(pump) sed -e 's/^N *//' $(pump) sed -e 's/ *W */ /' $(pump) sed -e 's/ */ /g' $(pump) sed -e 's/ / /g' $(pump) sed -e 's/://g' $(pump) sed -e 's/ *$$//g' $(pump) headline lat lon ssid bss hw time gmt snr sig noise $(pump) Column lat lon ssid hw time snr sig noise $(pump) $(EndPumping) $(CheckOut) $@ $(MoveThem) -$(ShowDiffs) $(CheckIn) $@ $(CleanUp) reboot: sudo unmounts $(sudo) reboot DELAY=5 poptest: P3set Host (echo user dbs; \ $(SleepSecond); \ echo pass $(P3); \ sleep $(DELAY); \ echo retr 1; \ $(SleepSecond); \ echo dele 1; \ sleep $(DELAY); \ echo quit) |\ telnet $(H) 110 P3: P3set echo for user dbs, you must know the passwd echo csh, tcsh, etc: setenv P3= echo -- or -- echo Posiz shells: export P3= P3set: ;test "$(P3)" != "" $(DAT)/fdisk: sudo -$(CleanUq) # remove when debugged $(MakeOut) $(prime) $(sudo) fdisk -s $(pump) dncase $(pump) tail +2 $(pump) onhead $(pump) sed -e 's/://' $(pump) $(EndPumping) $(CheckOut) $@ $(MoveThem) -$(ShowDiffs) $(CheckIn) $@ $(CleanUp) InBoxCounter=$(HOME)/$(DAT)/mailbase zero zeros: $(InBoxCounter) ;grdbep "[^.0-9]0[^0-9][0-9]" $?|trail -2 # mainly at noc MailPlaces=/mailtmp /net/igppmail mailwatch MailWatch: igpp Nset sudo $(sudo) find $(MailPlaces) -user $N -ls | comma|findrdb suspend: sudo #~ probably only works on TheSophomore $(sudo) zzz -z $(sudo) zzz -Z # OperatingSystemExample: the statement that echo emits will be executed. #~ Clone this TwoLines ViPaster /Operating System Example ## :.,/^$/-1t$ ### the statement that echo emits will be executed. OsExample: Oset ;`case "$O" in \ "bsd") echo "echo FreeBsd test on sophomore" ;;\ "bsdi") echo "echo Noc is BSDI test on sophomore" ;;\ "cygwin") echo "echo cygwin under NT on sophomore" ;;\ "hp11"|"hp10") echo "echo New Hewlet Packard test on aku" ;;\ "hp9") echo "echo old HP test on " ;;\ "linux")echo "echo linux test on sioprism" ;;\ "osx") echo "echo MacOsX test on bombaysapphire" ;;\ "sgi") echo "echo Old SGI test on sioviz" ;;\ "sgi64")echo "echo New SGI test on " ;;\ "sun4") echo "echo Old sunos test on " ;;\ "sun5") echo "echo Solaris test on nerd" ;;\ "suni86pc") echo "echo suni86pc" ;;\ * ) echo "echo Operating system unknown" ;;\ esac` $(LOG) # The paster above expects to find a comment here # Compare the architectures in the example with yyp!!archi -l PingableHost: Hset Oset #~ all one line with a little output for now @J=`echo $H|sed -e "s/.*@//"` ;\ `case "$O" in \ "sun5"|"suni86pc") echo "ping $$J 10 1" ;;\ "linux"|"sgi"|"osx"|"bsdi"|"bsd") echo "ping -c 1 $$J" ;;\ "cygwin") echo "ping -n 1 $$J " ;;\ "hp11"|"hp10") echo "echo New Hewlet Packard" ;;\ "hp9") echo "echo old HP" ;;\ "osx") echo "echo Mac OsX" ;;\ "sgi") echo "echo Old SGI" ;;\ "sgi64")echo "echo New SGI" ;;\ "sun4") echo "echo Old sunos" ;;\ * ) echo "echo Operating system unknown" ;;\ esac` $(2NULL) Host: PingableHost OtherHomes = BounceThis zion epicenter sio wallace noc arch radar bombaysapphire OtherUsernames = cgarrod@cfgauss d.9.cspamgarrod@spamgourmet.com EmailAddresses=`echo $(OtherHomes)|sed -e "s, , garrod@,g"` $(OtherUsernames) EmailAddresses: ;echo $(EmailAddresses) TestForwards: # send a message to AllAddresses to verify forwarding echo $(EmailAddresses) | mail -s $(DT) $(EmailAddresses) StartDesktop: zingers windows morewindows SyncIt=rsync $(HomeBase):$@ $@ CleanUpVarTmp: /var/tmp cd /var/tmp && mv `dir|greplist garrod|end` Trash 4d 4D 4dwm 4Dwm: sgi #~ launch the xserver SGI wants us to see until /usr/bin/X11/4Dwm -launch -xrm *SG_UseBackgrounds: True $(2NULL) ; do sleep 10;done & # RsyncWiki works better and faster after the initial port wikiport WikiPort: WikiPort.tgz #~ TarUp MyWiki WikiPort.tgz: wiki ;tar -cf - wiki | $(gzip) > $@ CronTask: MakefileMd5 dlay OtherTasks echo $@ continues OtherTasks: # safe with -k echo $@ continues $(ckg)/dt $(HostName) MakefileMd5: Makefile md5 $? | 5md > $@ rcsdiff $@ dly: ;if [ ! -t 0 ] ; then (sleep `echo $$$$|cut -c2-3`) ; fi #~ a small delay 99s max dlay: ;if [ ! -t 0 ] ; then (sleep `echo $$$$|cut -c2-4`) ; fi #~ a medium delay less than 17 mins delay: ;if [ ! -t 0 ] ; then sleep $$$$ ; fi #~ a long delay could be 9 hours Longer on SGI64 WikiMailList: noc #~ list the CamelCase MailBoxes cd Mail && ls | WikiWord | end|sort -u|pr -5 -w 85 | uniq fleas= # named tftpboot 20031125 making it portable tftpboot: tftpcheck tftpwrite tftpcheck: #~ archive the results cd /tftpboot && if [ -f Makefile ];then rm Makefile;fi cd /tftpboot && if [ ! -d RCS ];then ln -s $(TheDbs)/RCS RCS ;fi cd /tftpboot && rcsdiff $(l)g [0-9]k 2>&1 | gnot ========= '^diff' retrieving '^[0-9]' clock-period '^---$$' cd /tftpboot && $(CiQl) -m"$(Version)" $(l)g [0-9]k @echo Try ThisPaster: $(SaveConfig) @echo and do not forget to WRITE MEM SaveConfig=copy system:/running-config tftp://132.239.154.202/ SaveMac=show mac-address | redirect tftp://132.239.154.202/redirect$N tftpwrite: /tftpboot ; chmod a+w,o-r /tftpboot/$(l)g /tftpboot/[0-9]k tftp: /tftpboot echo on Flea, turn tftp on and then off when done echo PASTEME ===================================================================== @echo " sudo vi +/tftp /etc/inetd.conf;sudo kill -HUP `psgrep inetd|2nd|tail -1`" /tftpboot/RCS: /tftpboot ; $(MakeDirIfNeeded) /tftpboot: /net/com/tftpboot ; sudo ln -s $? $@ NoHome=/tmp/garrod NoHome nohome: @echo =============== PasteThis ================ @echo set -o vi @echo export HOME=$(NoHome) B=$(NoHome)/Bin @echo 'if [ ! -d $$B ] ;then if [ ! -d $$HOME ] ;then mkdir $$HOME;fi;mkdir $$B ;fi' @echo 'export PATH=$$PATH:$$B HISTFILE=$$HOME/.bash_history' @echo 'cd && exec bash -o vi' @echo '. ./.profile' @echo "echo `dt`" @echo =============== PasteThis ================ WikiWords: nerd Makefile Tmp TmpWiki wiki wiki/WikiWords wiki/WikiWords: wiki -$(CleanUq) $(MakeOut) $(CutForAwk) wiki/* $(prime) 1col $(pump) WikiWord $(pump) end $(pump) headoff $(pump) sort -fu $(pump) $(EndPumpingAndMoveThem) $(SixOhSixIt) $(CleanUp) # 20031112 WikiWorld from DogMelon looks like a nice FlatFile WindowsWiki # make it play well with my WikiFiles # ABANDONED: 20070205 WikiWorld.wiki: Makefile # WikiWords wiki #~ create file for Windows2000 ( cd wiki $(2null) && for i in $L ;\ do if [ -f $$i ] ;\ then echo "<<<"$$i":D:2:M>>>" ;\ grep -v "^.Id:" $$i ;\ fi ; done ; echo "" ) >$@ # FindCodes are a useful invention DatFind=$(DAT)/find FindCodesHere=$(DatFind)/find.codes find.codes: $(FindCodesHere) $(FindCodesHere): $(DatFind) ;find / -fstype local -ls > $@ SendFind sendfind: $(FindCodesHere) if [ ! -s $? ] ; then ls -l $? ; echo size zero ; fi $(SCP) $? $(HomeBase):$(DatFind)/$(HostName) cow ciw: $(TheDbs)/Makefile ;$(DbMake) DbMake=cd $(TheDbs) && $(MakeIt) $@ PluralProblem: Ndir #~ where N= wiki or Mail@noc or DataBases cd $N && for i in $L$l$L* ;do echo $$i*s;done | grep " " Version=Makefile$R # 20040310 this VariableW needs FullRefactoring -- see ww # W=/export/igppmail/apache/htdocs/forum/wiki-wiki.wdb # W=/var/www/htdocs/forum# TheDirectory on SioViz with SymbolicLinks since 20031225 # W=/net/igpp/garrod/wiki# Directory in MyHome now on geek with my ThousandsOfFiles W=/user/garrod/wiki# Directory in MyHome now on geek with my ThousandsOfFiles MyWikiFiles=$(HOME)/wiki WheresWiki: SioViz $W # 20050617 maybe broken see /^W= WheresWikiCgi =$W/../../cgi-bin# 20050617 maybe broken see /^W= WheresWikiCgi: humu $(WheresWikiCgi) # 20050617 maybe broken see /^W= NewWiki: SioViz Nset WheresWiki WheresWikiCgi WikiProgram # -mkdir $humu/$N.wdb # touch $W/$N.pag $W/$N.dir # chmod a+w $W/$N.* # cd $(WheresWikiCgi) && ln -s wiki $N # new $W/* $(WheresWikiCgi)/* # refactor wiki: /wiki\.wdb # wdb: igpp $W # $W/force: #read book and refactor # $W: $W/force ;(cd $@ && $(sudo) $(MakeIt) -ks) # 20070116 GettingBetter forget this: WikiProgram: $(WheresWikiCgi)/wiki LanList=(mac|misc|orc|plan|fish) TempAddresses tempaddresses: noc #~ print temporary addresses e.g. misc2 grep "^$(LanList)[0-9][^0-9]" named/igpp.data |sort nocmail: noc ida Dat/mailbase /var/mail/garrod -fg resize reset $(HOME)/bin/nospam namewindow " NOC"& if test -f /tmp/mbox.garrod;then rm /tmp/mbox.garrod;fi -biff n #~ ignore error because it is not always on. smail sleep 5 tail Dat/mailbase biff y # 20040111 WikiAtGeek # 20060615 WikiAtNerd MakePrint: etc/MakePrint etc/MakePrint: Makefile co -l $@ $(MakeIt) -p $(ToTarget) -rcsdiff -b $@ | gnot "^[-1-9]" "^[<>] # makefile \(from .Makefile., line " ci -u $@ in-dbs: ; test $(PWD) = $(TheDbs) CleanArpqs: nerd in-dbs arplast getarpq n arpqs export tickname=arpQ for i in $$y;do dt $$i;time rcs -o$$i arpqs;done echo $(MakeIt) y="`rld arpqs|awk '$$6>190000'|headline when file rev who new out info|tee /dev/tty|3rd|headoff `" GetArpq GetArpqs: getarpq getarpq: nerd in-dbs -$(CleanUq) # remove when debugged $(MakeOut) $(prime) ( sleep 2 ;\ echo "POST /cgi-bin/tools/arpq HTTP/1.0" ;\ echo "Referer: http://no-stats.$U/cgi-bin/tools/arpq" ;\ echo "Connection: Keep-Alive" ;\ echo "User-Agent: Mozilla/4.77 [en] (X11; U; SunOS 5.7 sun4u)" ;\ echo "Host: no-stats.$U" ;\ echo "Accept-Charset: iso-8859-1,*,utf-8" ;\ echo "Content-type: application/x-www-form-urlencoded" ;\ echo "Content-length: 102" ;\ echo "" ;\ echo "cmd=doform&ipaddr=&macaddr=&iprange1=132.239.89.1&iprange2=132.239.179.255 ;\ &query=&.submit=Submit+Query" ;\ echo "" ;\ sleep 444;\ )|telnet no-stats.$U 80 2>$d $(prime) $(MoreThem) # change to MoveThem when looking good, nearly done cat $(pump) $(EndPumping) #$(CheckOut) $@ # Uncomment last $(MoreThem) # change to MoveThem when looking good, nearly done #-$(ShowDiffs) # optional and only for a table #$(CheckIn) $@ # uncomment for first checkin DoTheNote $(CleanUp) # see what you are replacing :e $B/getarpq DoNot: $(SleepMinute) ida: noc cat /var/mail/garrod|greplist packet.loss|sort|uniq -c TicketsHtml: cd /net/tickets/Opened && for i in *[0-9];do (echo "Ticket $$i@igpp.$U";cat /net/marsbin/HtmlHeader $$i) > ../Html/$$i.html;done vnc .vnc: # vncaliases vlog: vnclog vnclog: vnclogs vnclogs: .vnc for i in $?/*log*;do echo tail -f $$i|$B/SecondUniq|cat &done tail -f Dat/Greetings & Greetings: nerd #~ make Dad comfortable tail -1000f .vnc/geek:1.log|$B/SecondUniq|cat & tail -f Dat/Greetings& echo 'export tickname=Greetings PS1="Type the word Greetings followed by stuff, and datestamps magically appear";namewindow' wikiwatch WikiWatch WebWatch: DeprecatedTargets LogSioViz/*log #~ 20070927 maybe you mean: make WatchWiki psgrep tail | headoff | killthem for i in $?;do tail -f $$i&done|grep -v SurfingBeaver|grep -v fialko|cat & MR=$(HomeMail)/received Dat/mailbase: noc # inbox received old@igpp spam # 20040220 dt `(messages;messages $(MR);messages $(MR)@igpp)|sed -e 's/no/0/'|third;grep "X-Spam-Flag: Spam YES" /var/mail/garrod|wc -l` >>$@ PushMakefile pushmakefile: nerd ;$(MakeIt) push N=Makefile NocMakefile: nerd ;$(PushMakefile) H=noc.$U BombaySapphireMakefile: nerd ;$(PushMakefile) H=BombaySapphire.$U SolariumMakefile: nerd ;$(PushMakefile) H=solarium.$U WikiMail: noc ;ls $(HomeMail)/|grep ^[A-Z] |pr -5|uniq norbal: ;echo "" normal: ;echo "" CronList=AdminCronTab SoftwareUpdate* NoCronTab: Host #~ WayneChen doesn't believe automation is our friend ssh admin@$H "date;hostname;crontab -l;crontab $d;crontab -l;rm $(CronList)" # 20040304 refactored into HomeMail globally HomeMail=$(HOME)/Mail # 20040310 retrim not dollared ReTrim=$(ckg)/retrim TestCaseProblem: Ndir #~ is file system CaseAware or CaseSensitive -ls -il $N/a $N/A $(2NULL) date > $N/a ls -il $N/a $N/A > $N/A grep . $N/a $N/A ( cmp $N/a $N/A $(2NULL) && echo CaseAware ) || echo CaseSensitive -rm -f $N/a $N/A CronTargets: hourly daily weekly monthly daily: ;: #~ do nothing for now hourly: ;touch Hourly monthly: ;: #~ do nothing but dependencies MonthTarget MonthlyTarget: ;$(TouchIt) # 20080403 found space needed? NoSpace allowed before # NotYetWorking -- BadLogic TouchIt=/usr/bin/touch $@ weekly: ;: #~ do nothing for now NoComment: NoComment.out ;rm NoComment.?;$(UnameIt) NoComment.out: NoComment.c ;$(CompileIt) NoComment.c: NoComment.l ;$(LexIt) NoComment.l: #~ Teaching the MakeFile to be able to UseLex $(BeginProgram) $(WhiteSpace) $(CommentRest) $(BlankLine) $(TwoPercents) $E "{comment} ;" $(TwoBlankLines) $(TwoPercents) $(YyWrapMain) $(CatTarget) NoBlank: NoBlank.out ;rm NoBlank.?;$(UnameIt) NoBlank.c: NoBlank.l ;$(LexIt) NoBlank.out: NoBlank.c ;$(CompileIt) NoBlank.l: #~ Teaching the MakeFile to be able to UseLex $(BeginProgram) $(WhiteSpace) $E "blank ^{WhiteSpace}*\n" $(BlankLine) $(TwoPercents) $E "{blank} ;" $(TwoBlankLines) $(TwoPercents) $(YyWrapMain) $(CatTarget) LexTest: NoComment NoBlank NoHtml TestWhiteTabs cat Makefile | ./NoComment.$(UnameCode) | ./NoBlank.$(UnameCode) | more SetLine setline: #~ Print some lines that I would like to paste or `!!` echo 'set -o vi ; export PATH=$$PATH:$$HOME/Bin' NoHtml: NoHtml.out ;rm NoHtml.? && $(UnameIt) NoHtml.c: NoHtml.l ;$(LexIt) NoHtml.out: NoHtml.c ;$(CompileIt) NoHtml.l: # 20040329 #~ Taught the MakeFile to UseLex $(BeginProgram) $E "LeftAngle <" $E "NotRightAngle [^>]" $E "RightAngle >" $E "BR {LeftAngle}[bB][rR]{RightAngle}" $E "TR {LeftAngle}[tT][rR]{RightAngle}" $E "TH {LeftAngle}\/[tT][hH]{NotRightAngle}*{RightAngle}" $E "TD {LeftAngle}\/[tT][dR]{RightAngle}" $E "EnclosedInAngleBrackets {LeftAngle}{NotRightAngle}*{RightAngle}" $E "" $(TwoPercents) $E "\n ;" $E "\ {0,1} printf(\" \");" $E "{BR} printf(\"\\n\");" $E "{TR} printf(\"\\n\");" $E "{TD} printf(\"\\t\");" $E "{TH} printf(\"\\t\");" $E "{EnclosedInAngleBrackets} ;" $E "" $(TwoPercents) $(YyWrapMain) $(CatTarget) InNis: ; ypcat auto.net $(2null) NotNis: ; ! ypcat auto.net $(2null) # BombaySapphire: bombaysapphire # bombaysapphire.$U: ;$(TestHost) # bombaysapphire: bombaysapphire.$U #### SedStuffBegin Some common arguments to sed :set list NoBlankLines=-e "/^$$/d" TabSpace=-e "s/ / /g" SpaceTab=-e "s/ */ /" SpacesTabs=-e "s/[ ][ ]*/ /g" SpaceSqueeze=-e "s/ */ /g" NoColons=-e "s/://g" NoCommas=-e "s/,//g" NoDashes=-e "s/-//g" Drop1stTab=-e "s/ //" remtrail=sed -e 's/ *$$//' noDot=sed -e 's/\.//' noVlan=sed -e 's/Vlan//' ObfuscateEmail=sed -e 's;@;\#;g' ObfuscateEmailAddresses=sed -e 's/@/<>/g' #### SedStuffEnd awk '/SedStuffBegin/,/SedStuffEnd/' Makefile rdbfree=#~ maybe there will be no target in the future. dependencies: TmpDat Dat/dependencies Dat/dependencies: $(rdbfree) Makefile # summary of who does what when using MAKE -$(CleanUq) # remove when debugged $(MakeOut) $(StartPumping) # just cats prereq's grep -v "^[ #]" $? $(pump) grep "^[^=]*:" $(pump) sed $(TabSpace) $(pump) grep -v "^ *$$" $(pump) sed -e "s/[;#].*$$//" $(pump) sed $(SpaceSqueeze) $(pump) sed -e "s/ */ /" $(pump) sed -e "s/: */ /" $(pump) sed -e "s/ *$$//" $(pump) headline target prereq $(pump) manyone $(pump) Column prereq target $(pump) manyone $(pump) Column target prereq $(pump) sorttbl $(pump) cat $(pump) $(EndPumping) $(CheqOut) $(MoveThem) -$(ShowDiffs) $(CheqIn) $(CleanUp) LinuxRootkitLooking: lsmod | diff - /proc/modules # 20040410 learning to use rsync on martha/hook sophomore/cygwin and others. DryRun=--dry-run DryRun=--modify-windows=1 # for the WindowsFileSystems DryRun= RsyncWiki: not-nerd # wiki ! ( $(SshHomeBase) cat wiki/$@ | diff - wiki/$@ ) ########################### An error here means that source and destination are the same or that this place is up to date $(SshHomeBase) 'dt >>wiki/'$@ `hostname` `(df -h .||df -k .||df - .)| tail -1` time rsync $(DryRun) $(HomeRsync) --stats -az --recursive $(HomeBase):wiki/ wiki/ # 20040414 T#13325 cstuart Connection to Patrick AFB aftac mcrd pacbell see ticket 8121 DISA CONUS RNOSC ticket 110047 # 125 while dt ;do (sleep 2;echo AftacUser;sleep 1;echo show interface serial 0;sleep 2;echo quit) | telnet igpp-aftac-gw >$tickenv.x ; diff $tickenv.x $tickenv.y; mv $tickenv.x $tickenv.y;sleep 1;done 2>&1 | gnot "^[-013-9]" Warning: igpp-aftac-gw.$U ^[0-9,]*c[0-9,]*$ |cat ShowAftac: ( sleep 2; \ echo AftacUser; \ sleep 1; \ echo show interface serial 0; \ sleep 2; \ echo quit) | \ telnet igpp-aftac-gw WatchAftac: Nset while dt ; \ do $(MakeIt) ShowAftac > Tmp/13325.x ; \ diff Tmp/13325.x Tmp/13325.y 2>&1 | \ gnot "^[-013-9]" Warning: igpp-aftac-gw "^[0-9,]*c[0-9,]*$$" ;\ mv Tmp/13325.x Tmp/13325.y; \ sleep $N; \ done TrashList: Trash hostname >> Trash/$(HostName) ls -lantr Trash/* SoftwareUpdate SoftwareUpdates: /usr/sbin/SoftwareUpdate $? $? -l MacStuff/MacHarvests: MacStuff ;@$(MkIt) MacStuff: ;@$(MkIt) nigroup: MacStuff/MacHarvests ; nidump group . > $?/$(HostName)_$@ InstallAllSoftwareUpdates: /usr/sbin/SoftwareUpdate ;$? --install --all SendMacStuff: MacStuff NotSoleDisk echo /usr/bin/$(SCP) -r MacStuff garrod@$(HomeHost): NotSoleDisk: df . | $(noUCSD) | grep geek: df . | grep /dev/dsk/c0t2d0s7 BadNames=Bin/[rR][mM] Bin/[rR][dD][Bb][iI][sS][mM] Bin/[dD][Tt] CaseProblems: echo $(BadNames) dir $(BadNames) | sorttbl -f path echo $? have problems with other programs similarly cased. GetFromNoc: nerd #~ These RCS files want to be kept here chmod +w .elm/RCS/elmrc,v .elm/RCS/aliases.text,v $(SCP) noc:.elm/elmrc,v noc:.elm/aliases.text,v .elm/RCS $(SCP) noc:.elm/aliases.text Dat/aliases.text SetElm: noc ElmRc=.elm/elmrc ElmSort: $(ElmRc) grep sortby $? SortBy=echo>>$(ElmRc) sortby = ElmSubject: ElmSort ;$(SortBy) Subject ElmReverse: ElmSort ;$(SortBy) Reverse-Mailbox # These program names conflict with other programs CaseProblems=Rm DT NameWindow OtherProblems=open Bin/DT: FixCaseProblems CaseProblemFix: /bin/rm Bin/Rm Bin/DT Bin/NameWindow ls -l $? CaseProblems: MouseFocus X11FollowFocus:defaults;defaults write com.apple.x11 wm_ffm true defaults: /usr/bin/defaults /usr/bin/defaults: #~ Must exist or else its not a Mac OsX DiffLibraryPreferences DiffPreferences: $(HOME)/Library/Preferences rcsdiff Library/Preferences/* Library/Preferences/*/* 2>&1 |\ gnot "No such file or directory" \ "retrieving revision" \ "RCS file: Library/Preferences/RCS" \ "===================================================================" |\ PipeLess ###### FinkStuff ###################### GetItFromGrunt=$(SCP) garrod@grunt.$U:$@ $@ #~ Is it installed yet # /ViPasterToSortThis # jj!}sort -u -r /sw: ;$(MakeDirIfNeeded) /sw/var/lib: /sw/var ;$(MakeDirIfNeeded) /sw/var/lib/dpkg: /sw/var/lib ;$(MakeDirIfNeeded) /sw/var/lib/dpkg/status: /sw/var/lib/dpkg ;$(GetItFromGrunt) /sw/var/db: /sw/var ;$(MakeDirIfNeeded) /sw/lib: /sw ;$(MakeDirIfNeeded) /sw/lib/perl5: /sw/lib ;$(MakeDirIfNeeded) /sw/lib/perl5/Fink: /sw/lib/perl5 ;$(MakeDirIfNeeded) /sw/lib/libapt-pkg.3.2.dylib: /sw/lib ;$(GetItFromGrunt) /sw/fink: /sw ;$(MakeDirIfNeeded) /sw/fink/dists: /sw/fink ;$(MakeDirIfNeeded) /sw/etc: /sw ;$(MakeDirIfNeeded) /sw/etc/fink.conf: /sw/etc ;$(GetItFromGrunt) /sw/bin: /sw ;$(MakeDirIfNeeded) /sw/bin/fink: /sw/bin ;$(GetItFromGrunt) /sw/bin/apt-cache: /sw/bin ;$(GetItFromGrunt) OwnSw: /sw sudo ;sudo chown -R $(LOGNAME) /sw FinkOddsAndEnds=/sw/var/db /sw/lib/libapt-pkg.3.2.dylib /sw/bin/apt-cache /sw/var/lib/dpkg/status /sw/fink/dists Fink: UnderConstruction FinkProgram=/sw/bin/fink FinkProgramParts=/sw/lib/perl5/Fink/Services.pm FinkProgramParts=/sw/lib/perl5/Fink/Engine.pm FinkProgramParts=/sw/lib/perl5/Fink/CLI.pm FinkProgramParts=/sw/lib/perl5/Fink/Configure.pm FinkProgramParts=/sw/lib/perl5/Fink/Config.pm FinkProgramParts=/sw/lib/perl5/Fink/Base.pm FinkProgramParts=/sw/lib/perl5/Fink/Command.pm FinkProgramParts=/sw/lib/perl5/Fink/Package.pm FinkProgramParts=/sw/lib/perl5/Fink/PkgVersion.pm FinkProgramParts=/sw/lib/perl5/Fink/NetAccess.pm FinkProgramParts=/sw/lib/perl5/Fink/Mirror.pm FinkProgramParts=/sw/lib/perl5/Fink/Status.pm FinkProgramParts=/sw/lib/perl5/Fink/VirtPackage.pm FinkProgramParts=/sw/lib/perl5/Fink/Bootstrap.pm FinkParts: $(FinkProgramParts) UnderConstruction ;cd /sw/lib/perl5/Fink/ &&scp -C -r garrod@grunt.ucsd.edu:/sw/lib/perl5/Fink/* . $(FinkProgramParts): /sw/lib/perl5/Fink;$(SCP) garrod@grunt.$U:$@ $@ #~ Is it installed yet FinkOptions=--yes --quiet FinkConfig: /sw/etc /sw/etc/fink.conf FinkUpdates: cvs $(FinkProgram) $(FinkProgramParts) $(FinkConfig) $(FinkProgram) $(FinkOptions) selfupdate-cvs $(FinkProgram) $(FinkOptions) update-all FinkFetches: $(FinkProgram) $(FinkProgramParts) $(FinkOddsAndEnds) $(FinkProgram) $(FinkOptions) fetch $(FinkFetches) $(WaynesFinkList) FinkList: Dat/FinkList $(FinkProgram) Dat/FinkList: $(FinkProgram) $(FinkOptions) list |\ headline i package version information >$@ # These were skipped at this time on BombaySapphire -- not found except emacs FinkNotFetches= \ gdal \ gnuplot23 \ libsvg2 \ mplayer \ FinkFetches= \ aspell \ curl-ssl \ doxygen \ findutils \ fileutils \ fondu \ g77 \ gawk \ gd2-bin \ ghostscript \ gimp \ gmt \ gnuplot \ gv \ imagemagick \ ispell \ libgnugetopt-shlibs \ mozilla \ netpbm10 \ numeric-py23 \ pil-py23 \ wget-ssl \ xmms \ xpdf \ xv \ WaynesFinkList= \ gmt \ gawk \ gv \ fileutils \ nedit \ tetex \ fort77 \ emacs21 \ LinesPerPrint=31 LinesOfMine=` mine | wc -l ` sheet: $(rdb) @test $(LinesOfMine) -le $(LinesPerPrint) || echo TooManyLines $(LinesOfMine) is greater than $(LinesPerPrint) @test $(LinesOfMine) -le $(LinesPerPrint) || echo and I still dont know how to duplex in the PrintCommand @test $(LinesOfMine) -le $(LinesPerPrint) || exit $(LinesPerPrint) echo LPDEST=$(LPDEST) is that where you want it? or !! LPDEST=adams read x mine|sorttbl subject|tickenv=`DTD` tickname=tickets tprint ww <$d DayBook Printed listing of tickets to work on TheKeller keller kellar: ;circuit -t keller | sbl BarnYard barnyard: ;circuit -t [^0-9]0301[2-9] [^0-9]0302[01] | sbl Solarium TheSolarium solarium: ;circuit -t 2114 kitfox | sorttbl room biscuit.l SingularPlurals: #~ Useful in Mail@noc and wiki@nerd and others... for i in *;do x=$$i's';if [ -f $$x ] ; then ls -dtgl $$i $$x;Singulars="$$Singulars "$$i;Plurals="$$Plurals "$$x;fi;done;echo Singulars $$Singulars;echo;echo Plurals $$Plurals CiaFactBook=http://www.cia.gov/cia/publications/factbook/ Dat/CiaFactBook: ;$(WgetIt) $(CiaFactBook) CiaFactBook: Dat/CiaFactBook CountryCodes: Dat/CountryCodes Dat/CountryCodes: Dat/CiaFactBook -$(CleanUq) # remove when debugged $(MakeOut) $(StartPumping) # just cats prereq's grep 'option.value' $(pump) sed -e 's;[^/]*/;;' $(pump) sed -e 's;.html[^>]*>; ;' $(pump) sed -e 's;<.*$$;;' $(pump) $(headline) code country $(pump) $(sorttbl) $(pump) $(EndPumping) $(CheckOut) # Uncomment last $(MoveThem) # change to MoveThem when looking good, nearly done -$(ShowDiffs) # optional and only for a table $(CheckIn) # uncomment for first checkin DoTheNote $(CleanUp) Desktop/cotvnc: ;@$(MkIt) CotVnc: cvs Desktop/cotvnc @ echo hit return at the password prompt cd Desktop && cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/cotvnc login cd Desktop && cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/cotvnc co cotvnc Desktop/cotvnc/cotvnc/Chicken\ of\ the\ VNC.pbproj DI=_Deleted\ Items DI: ls -l $(DI) StealBridgets: sudo ;make StealOne N=bsmith StealKmobleys: sudo ;make StealOne N=kmobley StealPrusso: sudo ;make StealOne N=prusso StealAdyess: sudo ;make StealOne N=adyess StealMad: sudo ;make StealOne N=mad StealOne: sudo Ndir test -d $N/$(DI) cp -r $N/_Deleted*/* _Deleted\ Items/ 2>&1 | fmt sudo chown -R garrod $(DI) TopTag=NewMagic/$(HostName) TopTag: NewMagic #~ Create a directory that will list near the top of things -- NewMagic if [ -f $(TopTag) ] ; then rm $(TopTag) ; fi if [ ! -d $(TopTag) ] ; then mkdir $(TopTag) ; fi touch $(TopTag) NewMagic: mkdir $@ ( cd $@ && df . ) | tellme NewMagic created on $(HostName) FutureDate: # 20040816 Note that the bin/Makefile tried this long ago aliases: Makefile $(HomeDir) GetFromNoc Dat/aliases Dat/aliases: Dat/aliases.text -$(CleanUq) # remove when debugged $(MakeOut) $(StartPumping) # just cats prereq's headline nickname lastname firstname comment address $(pump) sed -e 's/ = / /' $(pump) sed -e 's/; / /' $(pump) sed -e 's/, / /' $(pump) sed -e 's/ = / /' $(pump) Column address nickname lastname firstname comment $(pump) sorttbl -uf $(pump) $(EndPumping) $(CheckOut) # Uncomment last $(MoveThem) # change to MoveThem when looking good, nearly done -$(ShowDiffs) # optional and only for a table $(CheckIn) # uncomment for first checkin DoTheNote $(CleanUp) Mail/ToIgpphome: # send it if it exists ToIgpphome: Mail/ToIgpphome $(SCP) $? cgarrod@igpphome:Desktop # 20040824 fortune was composed while out at sea last April with AllanSauter SecondsPerLine=3 #~ wait three times the number of lines in seconds FortuneLoop fortune fortunes: /usr/games/fortune # found here on linux while sleep `expr $(SecondsPerLine) \* \`$?|tee /dev/tty |wc -l\``;do echo "";done NineFans: PlanNine/NineFansArchive cd $? && $(wget) $(WgetFlags) lists.cse.psu.edu/archives/9fans/ cd $? && for i in `grep .txt index.html|sed -e 's/^[^"]*"//' -e 's/".*//'` ;\ do $(wget) $(WgetFlags) lists.cse.psu.edu/archives/9fans/$$i $(2null) ;done ls -altr $? MatlabBench: ;(echo bench;echo quit)|matlab FixPerl: Bin ; cd $? && $(MakeIt) $@ N=`which perl` GmtTest: pscoast -R0/360/-90/90 -JQ180/6i -B60g30 -P -Dc -G200 >Tmp/map.ps Top200: Dat/Top200.csv Dat/Top200.csv: $(wget) -o $@ 'http://www.top500.org/sublist/index.php?vendor=%25&country=%25&app=%25&seg=%25&archtype=%25&sysfam=%25&procarch=%25&procfam=%25®ion=%25&rank_from=1&rank_to=200&limit=200&output=csv&date=2004-06&q=&submit=Generate+Sublist' Dat/VlanNumbers: etc/switch/*-vlan -$(CleanUq) # remove when debugged $(MakeOut) $(StartPumping) # just cats prereq's greplist ^[0-9] $(pump) awk 'NF>1{print $$1" "$$2}' $(pump) sort -u $(pump) sort -n $(pump) gnot ^200[0-9] enet static $(pump) headline vlan name $(pump) $(EndPumping) $(CheckOut) # Uncomment last $(MoveThem) -$(ShowDiffs) # optional and only for a table $(CheckIn) $(CleanUp) ManusDump: Makefile bin/manus.awk Newton/manus.ntf Newton/manus.new.awk Newton/manus.new.awk: Newton/manus.old.awk vi $B/manus.awk ~/Newton/manus.ntf $B/manus.awk >$@ diff $? $@ | less TellMe=mail -s "crontab $@ $?" garrod@$U SaveSwitchConfig: Nset @#echo '';echo '' @#echo $(SaveConfig) @echo "$(SaveMac)" @echo WRITE MEM @echo write net @echo 132.239.154.202 # thats flea, but not all hosts resolve it @echo '';echo '' $(WhatEcho) ' 'show mac-address ' ' && $(InterFace) @echo ' show interfaces description | exclude down' @echo '' @echo 'exit' @echo '' @echo Now is a good time to paste at flea: mm /tftpboot @echo 'Dont forget to exit the script too' @echo $(SaveConfig) @echo ' 'show mac-address ' | redirect tftp://132.239.154.202/redirect'$N WriteNet WriteMem writemem WRITEMEM: @echo WRITE MEM @echo write net @echo flea @echo '';echo '' SuggestBox: Nset @echo '';echo '' @echo cgrep -2 $P[^0-9] /tftpboot/$N "|sort -u" @cd /tftpboot && echo script redirect$(N)* | sed 's/-confg//' @cd /tftpboot && echo telnet $(N)* | sed 's/-confg//' @echo '' SuggestBoxes: @echo '';echo '' @cd /tftpboot && for i in *confg;do \ echo $$i |\ sed 's/ /\n/g' |\ sed 's/-confg//' |\ sed 's/^/telnet /' |\ cat ; done InterFace=(test $N = kitfox && echo interface fastEthernet $P ) || echo interface gigabitEthernet $P SetBox: Nset echo telnet sio-igpp-bldg$N000-4506 SetVlan: Hset Vset Nset Pset SuggestBox SeePort SuggestBox ConfigPort SaveSwitchConfig SeePort: #~ H is the port, N is the building prefix, V the Vlan $(WhatEcho) show ' ' && $(InterFace) $(WhatEcho) show ' ' && $(InterFace) description $(WhatEcho) show mac-address ' ' && $(InterFace) ConfigPort: SeePort #~ H is the port, N is the building prefix, V the Vlan @echo ' 'config term @$(InterFace) @echo description H=$H V=$V P=$P N=$N $D T#$(tickenv) $(tickname) @echo switchport access vlan $V @echo exit'' @echo exit # 20050119 T#23388 This becomes the NewVlanHw # 20050119 T#23388 garrod 22900 Attention in building 1000 and 2000 switch to new phone lines will begin soon VlanList=`grep '^[0-9]' $(TheDbs)/vlan | first|headoff|sort -u` # InterconnectTrunks -- superceded by NoTrunk TheTool # 20050119 T#23388 garrod Uplinks are in rdf,mdf, 1k,2k,4k UpLink=1/1[^0-9] # 20050119 T#23388 garrod Downlinks are from the 3k to [124]k DownLink=3k.2/[123][^0-9] MozillaLock: -echo Remove that if you want. Use CutAndPaste find .mozilla -name lock -ls -exec echo /bin/rm $(FoundFiles) IgppViz=for i in 0 1 2 3 4 5 6 7 8 ;do ssh c0-$$i IgppViz=for i in 0 1 2 3;do for j in 0 1;do ssh tile-$$i-$$j DoneDone=done;done ClusterDate: igppviz ; $(IgppViz) date ; $(DoneDone) ClusterHostname:igppviz ; $(IgppViz) hostname ; $(DoneDone) ClusterUptime: igppviz ; $(IgppViz) uptime ; $(DoneDone) ClusterCommand: igppviz Nset ; $(IgppViz) time $N ; $(DoneDone) ClusterCommanb: igppviz Nset ; $(IgppViz) time $N & $(DoneDone) ClusterCommans: igppviz Nset ; $(IgppViz) time $N & sleep 1; $(DoneDone) ClusterFactor: igppviz Nset ; $(IgppViz) time factor $N ; $(DoneDone) 2>&1 | sort -u|2tab -f' *'|headline question answer|onemany UcsdAtmPlaces=sio-igpp-munk-3508 sio-cmg-hubbs-hall-4506 sio-igpp-2114-2970 1k 2k 3k 4k MacAddressTable: $(HOME)/Makefile $(rdbfree) TenMin -$(CleanUq) $(MakeOut) -for j in $(UcsdAtmPlaces) ; \ do \ (echo ucsdatm ;\ $(SleepSpaces) ;\ echo exit ) | \ telnet $$j $(2null) & \ \ (echo ucsdatm ;\ $(SleepSpace) ;\ echo show users ;\ $(SleepSpace) ;\ for i in $(VlanList); do \ echo show mac-address-table vlan $$i; \ $(SleepSpaces); \ done; \ echo exit ) 2>&1 | \ \ telnet $$j 2>&1 | \ sed -e "s/Gigabit/$$j /" ; \ done $(pr1me) cat $(in) | greplist -n More # vty nocr $(pump) greplist Ethernet $(pump) sed -e 's/Ethernet/ /' $(pump) sed -e 's/^ *//' $(pump) sed -e 's/\.//' -e 's/\.//' $(pump) sed -e 's/000-4506/k/' $(pump) sed -e 's/ *$$//' $(pump) sed -e 's/^--More[^0-9]*//' $(pump) 2tab -gf' *' -d' ' $(pump) headline vlan hw type protocols box port $(pump) Column hw vlan box port type protocols $(pump) sorttbl $(pump) FixSlashPort $(pump) $(EndPumping) $(CheckOut) $(MoveThem) -$(ShowDiff)|$(NoTrunk) $(CheckIn) # $(CleanUp) # Use Cron instead # echo $(MakeIt) $@|at $(HM1) 2>$d SleepSpace=$(SleepSecond);echo ' ' SleepSpaces=$(SleepSpace);$(SleepSpace);$(SleepSpace);$(SleepSpace);$(SleepSpace);$(SleepSpace);$(SleepSpace);$(SleepSpace) QuickenSourceDirectory=/cygdrive/c/Documents\ and\ Settings/Chris\ Garrod/My\ Documents/Quicken/ QuickenDirectory=/cygdrive/c/qbackup QuickenFile=$(QuickenDirectory).tgz QuickenBackup: Makefile sophomore $(QuickenDirectory) # $(QuickenDirectory)/QDATA*$(YMD).* #~20060126 # 20070515 this stopped working: cd $(QuickenDirectory) && tar -cvzf $(QuickenFile) *$(YMD)* cd $(QuickenSourceDirectory) && tar -cvzf $(QuickenFile) Q* dt $@ ls -l $(QuickenFile)* ssh < $(QuickenFile) garrod@$(HomeHost) '$(EnCryptIt) >$@/$@.`dt`' dt $@ AppleHardwareAddress: #~ find ethernet hardware addresses netstat -in|awk '$$2==1500&&gsub(":","",$$0)==5{print $$4}' ifconfig|awk '$$1~/ether/{gsub(":","",$$2);print$$2}' OpenFirmware: Host telnet $H 9env: $(PLAN9) $(PLAN9)/sky/here lib/calendar DiffMakefile: Host Makefile Tmp/Makefile ;-diff Makefile Tmp/Makefile 2>&1 | PipeLess Tmp/Makefile: Host Tmp ;$(SCP) $H:Makefile $@ PlanNineCvsCommand=cvs -d :pserver:anoncvs@cvs.pdos.lcs.mit.edu:/cvs $(PLAN9): ;$(MakeDirIfNeeded) # assumes it came in from the environment PlanNineUpdate PlanNineUpdates : cvs $(PLAN9) cd $(PLAN9)/.. && $(PlanNineCvsCommand) login cd $(PLAN9)/.. && $(PlanNineCvsCommand) update plan9 2>&1|gnot ^cvs.update:.Updating /o[.][^./]*$$ DiskUsage=/bin/du -d -sk * | sort -rn | headline kb dir | comma DiskUsages: UpDiskUsage MyDiskUsage MyDiskUsage: $(HomeH) ;cd && $(DiskUsage) >wiki/$@ UpDiskUsage: $(HomeH) sudo ;cd /export/igpp && $(DiskUsage) >$(HOME)/wiki/$@ MyDat: $(HomeH) ;cd Dat && $(DiskUsage) >$(HOME)/wiki/$@ CsvReports: re*csv $(MakeOut) $(StartPumping) grep '^"' $(pump) $(noUCSD) $(pump) sed -e 's/\"//' $(pump) sed -e 's/\",\"/./3' $(pump) sed -e 's/\",\"/./2' $(pump) sed -e 's/\",\"/./1' $(pump) sed -e 's/\",\"/ /5' $(pump) sed -e 's/\",\"/ /4' $(pump) sed -e 's/\",\"/ /3' $(pump) sed -e 's/\",\"/ /2' $(pump) sed -e 's/\",\"/ /1' $(pump) headline ip host problem description k recommendation $(pump) Column ip k host problem description recommendation $(pump) cat - $(EndPumping) NewProfile newprofile: not-igpp not-nerd -chmod u+w .profile $(2null) $(WhatEcho) $(HomeBase)"'s " $(SCP) $(HomeBase):.profile .profile SendHome=$(SCP) $@ $(HomeBase):$@ PlanNineCompiles: $(PLAN9)/src ;cd $? && mk -k install 2>&1 | gnot "^$(PLAN9)" is.up.to.date '^do' nothing.to.see.here mk.*install|cat SshDiff: Nfile ;! ( $(SshHomeBase) cat $N | diff - $N ) # 200704040 NeverAgain It was a PatrickRusso avoidance site: WikiHost=sioviz.$U WikiHost=humu.$U UnitTestUrl=http://$(WikiHost)/cgi-bin/ChrisGarrod?TodaysPage UnitTestQuota=30m in-Tmp: ; test `basename $(PWD)` = Tmp WikiUnitTest: in-Tmp Ndir $(wget) -time $(wget) --quota=$(UnitTestQuota) -r $(UnitTestUrl) $(2NULL) diff -b -r $N $(WikiHost) 2>&1 |\ gnot Common.subdirectories \ Revision:.7 \ "^[-c0-9]*$$" \ Warning:.missing \ LastEdit \ No.newline.at.end.of.file \ |\ lioo3 |\ PipeLess # Still untested 20050526 T#23886 jlawrence http igpphome ucsd edu Down again FixHome: igpphome sudo /home ;sudo rm /home;cd ..&&sudo ln -s $(PWD) /home FixGroups:igpphome sudo /Groups ;sudo rm /Groups;cd ../..&&sudo ln -s $(PWD) /Groups MakefileUnitTest: Dat/MakefileUnitTest rcsdiff -b $? | \ sort +1 | \ gnot "^[0-9]*[cad,0-9]*$$" \ Makefile...line.[0-9] \ "^---$$" \ no.impossibilities.$ \ not.a.target \ '(Header|Id|Revision):' \ Make.data.base..printed |\ uniq -c -2 |\ gnot '^ 2' |\ PipeLess @echo if you like that do this: ci -l $? @echo Type yes if you want make to do that now read x;if [ x$$x = xyes ] ;then ci -l $? ;else echo x"$$x"x ;fi Dat/MakefileUnitTest: Makefile ;make -p > $@ 2>1 y='' WikiRobots: Makefile Tmp/wiki ApacheHost wiki/WikiRobots ; test ! -t 0||(adir $? $@ $(AccessLog)|rtq) wiki/WikiRobots: $(AccessLog) Makefile -$(CleanUq) $(MakeOut) echo wiki/WikiRobots: $(AccessLog) grep robots.txt $(AccessLog) $(prime) first $(pump) IpAddress $(pump) headoff $(pump) sort -nr $(pump) headline Count of IpAddresses requesting robots.txt $(pump) onemany $(pump) $(EndPumpingAndMoveThem) $(AddIdTag) $(CleanUq) DeletedItems: Dat/DeletedItems Dat/DeletedItems: nerd $(MakeOut) SudoTo igpphome -ssh igpphome sudo find /home/*/_Deleted\\\ Items -maxdepth 1 -ls $(pr1me) grep -v Items_ $(pump) grep -v Items$$ $(pump) findrdb $(pump) $(EndPumping) $(CheckOut) $(MoveThem) -$(ShowDiffs) $(CheckIn) $(CleanUp) WardsWikiWords=http://c2.com/cgi/likeGameData WardsWikiWords: wiki/WardsWikiWords #~ SisterSites should supercede Tmp/WardsWikiWords: Tmp Makefile ;$(WgetIt) $(WardsWikiWords) wiki/WardsWikiWords: Tmp/wiki Tmp/WardsWikiWords -$(CleanUq) $(MakeOut) $(StartPumping) awk '{print $$NF}' $(pump) headline This comes from $(WardsWikiWords) $(pump) $(EndPumpingAndMoveThem) -$(ShowDiffs) $(CleanUp) $(SixOhSixIt) NameWindow= namewindow $@ # allow more words afterwords NameWindow: Bin Bin/NameWindow Bin/namewindow: Bin/NameWindow: Bin/namewindow -/bin/rm $? $@ $(SCP) $(HomeBase):$@ $@ AutomountAll: /net ;-cd $? && for i in *;do cd $$i && pwd & done TopThirty: ApacheHost wiki/TopThirty #~ make a list of the top 30 accessors of ThisWiki wiki/TopThirty: $(AccessLog) -$(SixOhSixIt) -$(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) $(StartPumping) # just cats prereq's or command $(prime) or $(pr1me) gnot $(LinesTooLong) $(pump) grep cgarrod-.jpg $(pump) IpAddress $(pump) sort -rn $(pump) onemany $(pump) 1sp $(pump) $(EndPumpingAndMoveThem) # change to MoveThem when looking good, nearly done -$(ShowDiffs) # optional and only for a table $(CleanUp) # uncomment when deleting CleanUq above # Queries which were too long for tools to process MountUser MountUsers: MountGarrod #~ OtherUsers are a LargerProblem PingTheArcola: #~ expects to be on host sophomore at home for i in 1 2 3 4 5 6 7 8 9 10 ;\ do ping -n 1 10.0.1.$$i &\ done |\ nocr |\ rsr -u |\ grep Reply |\ sort h2phCommand="cd /usr/include && sudo h2ph -d " PerlHeaderFiles: TestExpn echo $(h2phCommand) `cat $? | 1col | grep "/" | head -2 | tail -1` "*.h */*.h" rm $? TestExpn: ; expn igpp grads 2>&1 |tee $@ GarrodExtern: ;for i in 1 2 3 4 5 6 7 8 9;do ssh -p2$$i garrod.extern &done;fg %1;bg;fg %2;bg;fg %3;bg;fg %4;bg;fg %5;bg;fg %6 ;bg; fg %7;bg;fg %8;bg;fg %9;bg AddIdTag=echo>>$@ ' $$'Id'$$' AddLine=echo>>$@ TopLine=echo >$@ TabIdTag=echo>>$@ ' $$'Id'$$' SioVizStuff: SioViz WikiPosters TopThirty WikiRobots ;: #~ make all three? HumuWikiStuff: humu WikiPosters TopThirty WikiRobots ;: #~ make all three? CutForAwk=cut -c1-6000 WJM=/tmp/WatchingJediMaster WJM2=$(WJM)2 WJM3=$(WJM)3 WatchJediMaster: jedimaster -/bin/rm -r $(WJM)* while psgrep rsync|2step started psgrep|sorttbl started pid|gnot garrod|tee -a $(WJM)|rtq ;\ do psgrep `awk -F' ' '0+$$2>0{print $$2}' $(WJM)|sort -u` > $(WJM2) ;\ rtq $(WJM2) ;\ if grep rsync $(WJM2) $(2NULL) ;\ then sudo date &&\ grep "/usr/sbin/sshd" $(WJM)|awk '{print "sleep 3600&&sudo kill "$$2 "&& /bin/rm $(WJM)* &"}'|uniq >$(WJM3) &&\ cat $(WJM3) &&\ sh -x $(WJM3) &\ sleep 60 ;\ /bin/rm $(WJM)* &\ else cat $(WJM);dt No Rsync on JediMaster ;\ sleep 600 ;\ fi ;\ done SudoLoop sudoloop : sudo ; while sudo true;do sleep 290;done& ShorterLines: AccessLog LinesTooLong=17/Dec/2003:08:20:33 \ 16/Jul/2005:09:45:10 \ EndLinesTooLong CutLongLines=cut -c1-6000 wiki/AccessLog: WheresWiki wiki/AccessLog $(AccessLog) -$(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start grep cgi-bin/ChrisGarrod $(AccessLog) $(prime) $(CutLongLines) $(pump) $(EndPumpingAndMoveThem) # change to MoveThem when looking good, nearly done $(AddIdTag) $(SixOhSixIt) FlinnEngdahl: Makefile Dat/FlinnEngdahl Tmp/FlinnEngdahl FlinnEngdahl=http://bourabai.narod.ru/database.htm Tmp/FlinnEngdahl: ;$(WgetIt) $(FlinnEngdahl) Dat/FlinnEngdahl: Tmp/FlinnEngdahl -$(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) $(StartPumping) # just cats prereq's or command $(prime) or $(pr1me) cat $(pump) $(EndPumping) #$(CheckOut) # Uncomment last $(MoreThem) # change to MoveThem when looking good, nearly done #-$(ShowDiffs) # optional and only for a table #$(CheckIn) # uncomment for FirstCheckin DoTheNote #$(CleanUp) # uncomment when deleting CleanUq above CrontabAtGeek: geek wiki/CrontabAtGeek wiki/CrontabAtGeek: geek CronTabs/geek crontab -l | nocomment > $@ $(AddIdTag) $(SixOhSixIt) CrontabAtSioviz: SioViz wiki/CrontabAtSioviz wiki/CrontabAtSioviz: SioViz CronTabs/sioviz crontab -l | nocomment > $@ $(AddIdTag) $(SixOhSixIt) WikiPosters: TmpDat ApacheHost wiki/WikiPosters wiki/WikiPosters: Dat/WikiPosters $(MakeOut) $(StartPumping) onemany $(pump) $(rename) count "How many posts from each" $(pump) $(EndPumpingAndMoveThem) $(AddIdTag) $(SixOhSixIt) $(CleanUp) Dat/WikiPosters: $(AccessLog) .force $(MakeOut) grep POST./cgi-bin/ChrisGarrod $(AccessLog) $(prime) first $(pump) sort $(pump) uniq -c $(pump) sort -nr $(pump) whitetabs $(pump) headline count IpAddress $(pump) $(EndPumping) $(CheqOut) $(MoveThem) -$(ShowDiffs)|rsr $(CheqIn) $(CleanUp) EtherForm etherform : $(OpenedTickets).$(tickenv) #~ get the info in the form for pasting echo mars@$U tg host | grep "^host"|gnot alias echo ticket $(tickenv) update echo 132.239.153.0/24 or 132.239.154.128/26 vlan 33 echo '' t@|grep @ echo 132.239.153 tg O/S | grep "^O" echo '' tg room | grep "^room" echo '' tg host | grep "^host" echo '' t|HardwareAddress|2step HardwareAddress tg|uncolonize echo nowt -c I filled out the form nowt -c I filled out the form echo Now enter the ID in the HostmasterReply message subject echo You gotta paste this line: echo -n "add2sub $(tickenv) - " OfficeLocation=32.82541 117.22279 287 #~ actually, this is TheArcola here: $(PLAN9)/sky/here $(PLAN9)/sky/here: $(PLAN9) echo $(OfficeLocation) > $@ SunSet sunset: $(PLAN9) $(PLAN9)/sky/here @echo `9 astro -k|grep -i sun.*sets|sed -e 's/.*at //' -e 's/://' -e 's/:.*//' ` @leave `9 astro -k|grep -i sun.*sets|sed -e 's/.*at //' -e 's/://' -e 's/:.*//' ` MdfPorts: ;Rswitches mdf|FixSlashPort|sorttbl -u switch port TicketNum ticket.num: /net/tickets/ticket.num /net/tickets/ticket.num: /net/tickets cat $@ >/dev/null || echo "on obsip: make MountTickets" | mail -s "tickets@obsip" garrod@$U ######## These are things I want done on a Fresh FreeBSD installation 4.5... MkIt=test -d $@ -o -L $@ || ( mkdir $@ && mkdir $@/RCS ) # see also MakeDirIfNeeded which is done with SuDo Bin: ;@$(MkIt) lib: ;@$(MkIt) #~ for plan9 MakeDirIfNeeded=if [ ! -d $@ ] ; then $(sudo) mkdir $@;fi MakeDirIfNeeded=test -d $@ || $(sudo) mkdir $@ MakeUpDirIfNeeded=test -d `dirname $@` || $(sudo) mkdir `dirname $@` MakeDirWithoutSudoIfNeeded=test -d $@ || mkdir $@ $@/RCS /net/com: /net ;$(MakeDirIfNeeded) $(TheDbs): /net ;$(MakeDirIfNeeded) /net/igpp: /net ;$(MakeDirIfNeeded) /net/igppmail: /net ;$(MakeDirIfNeeded) /net/logs: /net ;$(MakeDirIfNeeded) /net/magic: /net ;$(MakeDirIfNeeded) /net/mars: /net ;$(MakeDirIfNeeded) /net/marsbin: /net ;$(MakeDirIfNeeded) /net/rc: /net ;$(MakeDirIfNeeded) /net/src: /net ;$(MakeDirIfNeeded) /net/tickets: /net ;$(MakeDirIfNeeded) /net/uniq: /net ;$(MakeDirIfNeeded) /net/xigpp: /net ;$(MakeDirIfNeeded) /net: /net/. /net/.: ;$(MakeUpDirIfNeeded) /net/$N: /net ;$(MakeDirIfNeeded) /user: sudo ;$(MakeDirIfNeeded) # 20060516 Flaw below: /user may be older, but must exist /user/garrod: sudo /user ;$(MakeDirIfNeeded) /user/garrod/Makefile: /user/garrod/ ;$(MountGarrod) $(PrimaryHomeDir): /user ;$(MountGarrod) PrimaryHomeDir=/user/garrod##### My primary home site currently on HostGeek PrimaryHomeDir=/user/garrod##### My primary home site 20060615 HostNerd WeekDays: calendar wiki/WeekDays wiki/WeekDays: calendar for i in $(Order);do for j in $(WeekDays);do calendar $$i$$j >wiki/$$i$$j;done;done Order=First Second Third Fourth Fifth WeekDays=Sundays Mondays Tuesdays Wednesdays Thursdays Fridays Saturdays NoCp=sed -e's;.cluster.private;;g' WolfPackDate: ;for i in $(WolfPackNodes);do ssh $$i date & done 2>&1 | sort | uniq -c WolfPackData: ;for i in $(WolfPackNodes);do dt `ssh $$i hostname `& done 2>&1 |$(NoCp) |sort |onemany|cat WolfPackCommand: Nset ;for i in $(WolfPackNodes);do ssh $$i $N ; done WolfPackCommanb: Nset ;for i in $(WolfPackNodes);do ssh $$i $N & done OldGeekStuff: $(HOME)/OldGeekStuff # really on nerd these days. test -d $? || echo $? does not exist, THINK, do you want to mkdir $? ;fail ls -lda $? $(HOME)/OldGeekStuff: $(HOME)/OldGeekStuff/Makefile #~ Existence is required $(HOME)/OldGeekStuff/Makefile: $(HOME)/Makefile ident $? $@ -diff -b $? $@ time rsync $(RsyncPath) --delete-after -v -v --stats -az --recursive garrod@$(HomeHost):. OldGeekStuff/ |\ grep -v uptodate$$ |\ grep -v is.newer$$ |\ grep -v /$$ RsyncExcludes=--exclude='**/Tmp*' --exclude='**[cC]ache/' --exclude='**/Trash' UsrInclude=/usr/include h2ph: sudo ;$(sudo) h2ph $(UsrInclude)/* $(UsrInclude)/*/* ScrabbleChallengeGameMoves: Tmp/Tmp Tmp/wiki wiki/ScrabbleChallengeGameMoves wiki/ScrabbleChallengeGameMoves: Tmp/ScrabbleLastGameUnMarkedUp $(MakeOut) $(StartPumping) sed -e 's/[()]//g' $(pump) awk '/Turn /,/Close Window/' $(pump) gnot ABCDEFGHIJKLMNO $(pump) gnot 1.2.3.4.5.6.7.8.9.0.1.2.3.4.5 $(pump) gnot = $(pump) $B/JoinTillBlankLine $(pump) cat $(pump) $(EndPumping) # moved to wiki $(CheckOut) $(MoveThem) $(AddIdTag) # moved to wiki $(CheckIn) $(CleanUp) Tmp/ScrabbleLastGameUnMarkedUp: Tmp/ScrabbleLastGame -$(CleanUq) $(MakeOut) $(StartPumping) inout.pl 2>/dev/null $(pump) sed -e 's/(\*.*/ /g' $(pump) sed -e 's/[()]//g' $(pump) sed -e 's/ / /g' $(pump) sqz $(pump) uniq $(pump) cat $(pump) $(EndPumpingAndMoveThem) $(CleanUp) Tmp/ScrabbleCurrentGameUnMarkedUp: Tmp/ScrabbleCurrentGame -$(CleanUq) $(MakeOut) $(StartPumping) striphtml 2>/dev/null $(pump) sed -e 's/(\*.*/ /g' $(pump) sed -e 's/[()]//g' $(pump) sed -e 's/ / /g' $(pump) sqz $(pump) uniq $(pump) cat $(pump) $(EndPumpingAndMoveThem) $(CleanUp) ScrabbleChallenge=http://ironphoenix.org/cgi-bin/scrabble ScrabbleChallengeHistory=$(ScrabbleChallenge)_history.pl ScrabbleChallengeHistoryFirstToLast=$(ScrabbleChallenge)_history.pl?which=current&chrono=1#turns ScrabbleChallengeHistoryPrevious=$(ScrabbleChallengeHistory)?which=previous ScrabbleCurrentGameMoves: wiki/ScrabbleCurrentGameMoves ;: ScrabbleLastGameMoves: wiki/ScrabbleLastGameMoves ;: Tmp/ScrabbleCurrentGame: UnderConstruction ;$(WgetIt) $(ScrabbleChallengeHistory) Tmp/ScrabbleCurrentGameParse: UnderConstruction ;$(WgetIt) $(ScrabbleChallengeHistoryFirstToLast) Tmp/ScrabbleLastGame: UnderConstruction ;$(WgetIt) $(ScrabbleChallengeHistoryPrevious) ScrabbleChallengeLastGame: ScrabbleChallengeLastGameSummary ScrabbleChallengeLastGameSummary: wiki/ScrabbleChallengeLastGameSummary wiki/ScrabbleChallengeLastGameSummary: Tmp/ScrabbleLastGameUnMarkedUp $(MakeOut) $(StartPumping) awk '/Final Scores/,/^\*/' $(pump) sed -e 's/[ %]//g' $(pump) tail +3 $(pump) fmt $(pump) sed -e '/^[*]*$$/d' $(pump) sed -e 's/ */ /g' $(pump) sed -e 's/..nbsp//g' $(pump) $(InsertDash) $(pump) # finally it becomes a table cat $(pump) $(EndPumping) # not for wiki $(CheckOut) $(MoveThem) -$(ShowDiffs) $(AddIdTag) # not for wiki $(CheckIn) $(CleanUp) ScrabbleChallengeCurrentGame: ScrabbleChallengeCurrentGameSummary ScrabbleChallengeCurrentGameSummary: wiki/ScrabbleChallengeCurrentGameSummary wiki/ScrabbleChallengeCurrentGameSummary: Tmp/ScrabbleCurrentGameUnMarkedUp $(MakeOut) $(StartPumping) awk '/Running Totals/,/^\*/' $(pump) sed -e 's/[ %]//g' $(pump) tail +3 $(pump) fmt $(pump) sed -e '/^$$/d' $(pump) sed -e '/^..nbsp/d' $(pump) sed -e 's/ */ /g' $(pump) $(InsertDash) $(pump) # finally it becomes a table cat $(pump) $(EndPumping) $(MoveThem) #-$(ShowDiffs)|greplist player -- ChrisGarrod AllPlayers Computer $(SivsNames) 100.0|sed -e 's; *; ;g' Column <$@ Efficiency Player|sorttbl|onemany|greplist ChrisGarrod 100 $(SivsNames) |sort -rn $(AddIdTag) $(CleanUp) SivsNames=sweetie missm barbro jenny sweetie siv smg missm barbro jenny #1k 2k 3k 4k: ;for i in 1 2 3 4 ;do b=sio-igpp-bldg-;a=000-4506-confg k=k;ln -s $$b$$i$$a $$i$$k;done AutoNet: for i in `ypcat -k auto.net | first`;do ls -latdr /net/$$i/_* & done wait dfrdb -h | sorttbl pct # 200060523 Note SysAdmin preserves the Makefile this target mounts the dir sysadmin: /net/Groups /Volumes/home/Groups/sysadmin /net/Groups: # are we on a place with an AutoMounter? /Volumes/home/Groups/sysadmin: /Volumes/home/Groups ;@$(MkIt) /Volumes/home/Groups: /Volumes/home ;@$(MkIt) /Volumes/home: /Volumes ;@$(MkIt) /Volumes: /Volumes/. sudo ;$(OwnWrite) /Volumes/.: ;$(MakeUpDirIfNeeded) /igpp: sudo ;$(MakeDirIfNeeded) && $(OwnWrite) /igpp/me: /igpp ;@$(MkIt) OwnWrite=sudo chown garrod.staff $@ && chmod g+w $@ WikiWordIt=perl -p -e 's/([A-Z][a-z]+)\s+([A-Z][a-z]+)/$$1$$2/go' SansNetBlock: wiki/SansNetBlock ; SansNetBlock=http://feeds.dshield.org/block.txt Tmp/SansNetBlock: Tmp/wiki ;$(WgetIt) $(SansNetBlock) $(2NULL) wiki/SansNetBlock: Tmp/SansNetBlock $(MakeOut) $(StartPumping) grep "^[1-9].* " $(pump) ipsort $(pump) headline start end netblock attacks name country email $(pump) Column start netblock country email name $(pump) $(rename) netblock CIDR $(pump) $(rename) country CC $(pump) $(ObfuscateEmail) $(pump) $(WikiWordIt) $(pump) sed -e 's/sichuan/Sichuan/g' $(pump) sed -e 's/ province/Province/g' $(pump) sed -e 's/[nN]etwork/NetWork/g' $(pump) sed -e 's/[cC][hH][iI][nN][aA][Nn][eE][tT]/ChinaNet/g' $(pump) sed -e 's/[fF][aA][sS][tT] *[Cc][oO][lL][oO][cC][aA][tT][iI][oO][nN]/FastColocation/g' $(pump) $(EndPumping) $E DataFrom' '$(SansNetBlock) # $(CheckOut) $(MoveThem) $(AddIdTag) #$(LockIn) $(SixOhSixIt) $(CleanUp) requires: Nset Hset ;$(MakeIt) pull MaxProcs: /etc/launchd.conf #~untested ForkFailed /etc/launchd.conf: sudo echo limit maxproc 512 2048 >/tmp/launchd.conf #~untested if [ -f $@ ];then sudo diff /tmp/launchd.conf $@ ;\ else sudo $(CopyPreserve) /tmp/launchd.conf $@ ;\ fi libdraw: $PLAN9/lib/libdraw.a #~untested $PLAN9/lib/libdraw.a: ;$(SCP) cgarrod@igpphome:plan9/lib/libdraw.a $@ #~untested PlanNineDb=http://cm.bell-labs.com/sources/plan9/dist/replica/plan9.db Tmp/PlanNineDb: Hourly ;$(WgetIt) $(PlanNineDb) PlanNineDb: Tmp/Dat DatPlanNineDb Tmp/PlanNineDb Makefile DatPlanNineDb: Makefile Dat/PlanNineDb Dat/PlanNineDb: Tmp/PlanNineDb -$(CleanUq) $(MakeOut) $(StartPumping) awk '/HEADER/,/BEGIN/' $(pump) gnot " " @echo " Zoom" @echo " @Z" @echo " Zooma" @echo " @Z" @echo " " $(ToXml) $(TerminalPlist) ci -q -l -t-'adding ZoomKey ckg' -m'ZoomKey' $(TerminalPlist) @echo "Copy the above and get ready to paste it into vi near the bottom of the file" @read x vi + $(TerminalPlist) FtpMirror=ftp://mirror.ucsd.edu/Ls-lRrt #~ listing of mirror.ucsd.edu FtpMirror: Dat/FtpMirror UnderConstruction Tmp/FtpMirror: Makefile ;$(WgetIt) $(FtpMirror) Dat/FtpMirror: UnderConstruction Tmp/FtpMirror -$(CleanUq) $(MakeOut) $(StartPumping) lsgrdb $(pump) cat $(pump) $(EndPumping) $(CheckOut) $(MoveThem) -$(ShowDiffs) $(CheckIn) $(CleanUp) apacheerr= $(alogs)/error_log ErrHumu=/opt/csw/apache2/var/log/error_log ErrHumu= /var/apache/logs/error_log ErrorLog= /var/apache/logs/error_log igppwebapachelog=$(alogs)/access_log AccessLog= $(LogSioViz)/access_log AccessLog= $(LogHumu)/access_log /Volumes/CaseSensitive: /Volumes/. /usr/bin/open Desktop/CaseSensitive.dmg /usr/bin/open Desktop/CaseSensitive.dmg Bin/Bin: /Volumes/CaseSensitive mkfile: public_html UnderConstruction ;checkinout $@ && cp -p $@ public_html/$@ #~ for PlanNine and PlanNinePort BOTH! NoEnding: wiki/NoEnding #~ find WikiPages that don't end with a line feed wiki/NoEnding: UnderConstruction Nset cd ~/wiki && for i in $N*;do dt $$i `tail -1 $$i|od -c|tail -2|head -1`;done|grep -v ' \\n$$' >NoEnding FindPlists=find -x . -name \*.plist FindExec=$(FindPlists) -exec FoundFiles={} \; AndExec=$(FoundFiles) -exec ToXml=plutil -convert xml1 PlistText=$(ToXml) $(FoundFiles) PlistText: ;$(FindExec) $(PlistText) #~ more likely used in combination PlistCheck: ;$(FindExec) $(PlistText) -exec $(CiQlFaL) $(FoundFiles) 2>&1 |gnot $(PlistIgnore)|cgrep -1 revision|gnot ^$$ ----|uniq PlistDiff PlistDiffs: ;$(FindExec) $(PlistText) -exec rcsdiff -b $(FoundFiles) 2>&1 |gnot $(PlistIgnore) ^RCS.file retrieving ^[0-9] PlistDiffCheck: ;$(FindExec) $(PlistText) \ -exec rcsdiff -b \ $(AndExec) $(CiQlFaL) $(FoundFiles) 2>&1 |\ sed $(SpaceSqueeze) |\ gnot $(PlistIgnore) ^RCS.file -r1.1[^0-9] retrieving ^[0-9] |\ PipeLess||: # End a cascade of LinesEndingWithBackSlash PlistOwn: sudo ;$(FindExec) $(sudo) chown $(USER) $(FoundFiles) PlistIgnore=unchanged plist,v... '^[-= ]*$$' done -r1.1[^0-9] RldIt=rld $? > $@ && $(AddIdTag) wiki/RldMakefile: Makefile ;$(RldIt) wiki/RldDbsMakefile: $(TheDbs)/Makefile ;$(RldIt) wiki/RldDependencies: $(TheDbs)/dependencies ;$(RldIt) wiki/RldSupport: $(TheDbs)/support ;$(RldIt) RldFiles: wiki/RldSupport wiki/RldDependencies wiki/RldDbsMakefile wiki/RldMakefile RLD: wiki/RLD TmpWiki #~ looking back, that looks like a dumb idea. wiki/RLD: UnderConstruction $(MakeOut) ( cd wiki && rld * ) $(pr1me) sort -r $(pump) $(EndPumping) $(CheckOut) $(MoveThem) -$(ShowDiffs) $(LockIn) $(SixOhSixIt) $(CleanUp) FirstEdition=-t-FirstEdition FirstCheckin=-t-InitialCheckin LaterCheckins=-mLaterCheckins FirstAndLater=$(FirstEdition) $(LaterCheckins) CiQl=ci -q -l CiQlFaL=$(CiQl) $(FirstEdition) $(LaterCheckins) # ReFactored 20070815 and 20070816 repaired a quote leak scw: wiki/ScrabbleChallengeWords RecipesThat ArentReady ForPrimeTime: # 20070817 in the wiki, search for files that differ from their checked in version # that shouldn't happen, but it does. while read x;do ci -q -l $(FirstCheckin) -m"DifferencesFound" $x;done 3878 vi CheckedInFiles echo *|xargs rcsdiff -b -kk 2>&1|gnot ^RCS ===== retrie $Id[$:] ^---$ ^[,0-9]*[acd][,0-9]*$ |more TraceRouters all over the world more ~/Dat/TraceRoutes |while read x;do i=`echo $x|awk -F/ '{print $3}'` ;wget --output-document=$i $x?132.239.154.206;done more ~/Dat/TraceRoutes |while read x;do i=`echo $x|awk -F/ '{print $3}'` ;(sleep $RANDOM;wget --output-document=$i $x?132.239.154.206)&done SudoKantWork: $(CgiBin) ;cp -p $B/SudoKant $(CgiBin)/SudoKant SudoKantNotWork: $(CgiBin) $(CgiBin)/SudoKant $(CgiBin)/SudoKant: ;echo>$@ #!/bin/sh;echo>>$@ sleep 60000 CgiBin=/var/apache/cgi-bin NoEcho=stty -echo NowEcho=stty echo WirelessVlan=[^0-9a-f]130[^0-9a-f] MacAddresses0k 0k: TmpWiki wiki/MacAddresses0k UnderConstruction wiki/MacAddresses0k:: UnderConstruction MacAddresses0k 0k: TmpWiki wiki/MacAddresses0k UnderConstruction # NOTE this table needs different processing from the [1-4]k boxen wiki/MacAddresses0k:: $(NetCom)/tftpboot/redirect0k $(CleanUq) $(MakeOut) $(StartPumping) awk '/mac address/,/^$$/' $(pump) nocr $(pump) whitetabs $(pump) headoff $(pump) headline x vlan hw type learn age ports $(pump) gnot ',' $(pump) Column hw type learn vlan ports $(pump) #$(CheckOut) $(2null) $(PrependOld) $(pump) sed -e 's/[.]//g' $(pump) lioo $(pump) sorttbl -u $(pump) $(EndPumpingAndMoveThem) # 20080124 do I need this? $(LockIn) $(SixOhSixIt) -$(ShowDiff) |gnot Gi5/1 0100.5e7f.fff $(WirelessVlan) $(CleanUp) MacAddresses1k 1k: TmpWiki wiki/MacAddresses1k UnderConstruction wiki/MacAddresses1k:: $(NetCom)/tftpboot/redirect1k $(MakeOut) $(StartPumping) awk '/Unicast/,/Multicast/' $(pump) nocr $(pump) NoMoreCisco $(pump) gnot Unicast Multicast ^[-+]*$$ '/.*,.*/' $(pump) sed -e 's/mac address/hw /' $(pump) onhead $(pump) sed -e 's/port[s]*/ports/' $(pump) $(ShortenGigabitEthernet) $(pump) Column hw type protocols vlan ports $(pump) sed -e 's/protocols/learn/' $(pump) $(CheckOut) $(2null) $(PrependOld) $(pump) sed -e 's/[.]//g' $(pump) lioo $(pump) sorttbl -u $(pump) $(EndPumpingAndMoveThem) #$(LockIn) $(SixOhSixIt) -$(ShowDiff) |gnot Gi5/1 0100.5e7f.fff [^0-9a-f]130[^0-9a-f] $(CleanUp) MacAddresses2k 2k: TmpWiki wiki/MacAddresses2k UnderConstruction wiki/MacAddresses2k: $(NetCom)/tftpboot/redirect2k $(MakeOut) $(StartPumping) awk '/Unicast/,/Multicast/' $(pump) nocr $(pump) NoMoreCisco $(pump) gnot Unicast Multicast ^[-+]*$$ '/.*,.*/' $(pump) sed -e 's/mac address/hw /' $(pump) onhead $(pump) sed -e 's/port[s]*/ports/' $(pump) $(ShortenGigabitEthernet) $(pump) Column hw type protocols vlan ports $(pump) sed -e 's/protocols/learn/' $(pump) $(CheckOut) $(2null) $(PrependOld) $(pump) sed -e 's/[.]//g' $(pump) lioo $(pump) sorttbl -u $(pump) $(EndPumpingAndMoveThem) -$(ShowDiff) |gnot Gi5/1 0100.5e7f.fff [^0-9a-f]130[^0-9a-f] #$(LockIn) $(SixOhSixIt) $(CleanUp) MacAddresses3k 3k: TmpWiki wiki/MacAddresses3k UnderConstruction wiki/MacAddresses3k:: $(NetCom)/tftpboot/redirect3k $(MakeOut) $(StartPumping) awk '/Unicast/,/Multicast/' $(pump) nocr $(pump) NoMoreCisco $(pump) gnot Unicast Multicast ^[-+]*$$ '/.*,.*/' $(pump) sed -e 's/mac address/hw /' $(pump) onhead $(pump) sed -e 's/port[s]*/ports/' $(pump) $(ShortenGigabitEthernet) $(pump) Column hw type protocols vlan ports $(pump) sed -e 's/protocols/learn/' $(pump) $(CheckOut) $(2null) $(PrependOld) $(pump) sed -e 's/[.]//g' $(pump) lioo $(pump) sorttbl -u $(pump) $(EndPumpingAndMoveThem) -$(ShowDiff) |gnot Gi5/1 0100.5e7f.fff [^0-9a-f]130[^0-9a-f] #$(LockIn) $(SixOhSixIt) $(CleanUp) MacAddresses4k 4k: TmpWiki wiki/MacAddresses4k UnderConstruction wiki/MacAddresses4k:: $(NetCom)/tftpboot/redirect4k $(MakeOut) $(StartPumping) JoinIndentNoColon $(pump) gnot Legend: ^[-+]*$$ $(pump) gnot Unicast Multicast ^[-+]*$$ '/.*,.*/' $(pump) sed -e 's/mac address/hw /' $(pump) onhead $(pump) sed -e 's/ /,/g' $(pump) sed -e 's/[ ]*$$//g' $(pump) # Trailing tabs or spaces $(ShortenGigabitEthernet) $(pump) Column hw type learn vlan ports $(pump) $(CheckOut) $(2null) $(PrependOld) $(pump) sed -e 's/[.]//g' $(pump) # lioo $(pump) gnot Switch,Stby-Switch $(pump) sorttbl -u $(pump) $(EndPumpingAndMoveThem) -$(ShowDiff) |gnot Gi5/1 0100.5e7f.fff [^0-9a-f]130[^0-9a-f] #$(LockIn) $(SixOhSixIt) $(CleanUp) MacAddresses0k 0k: TmpWiki wiki/MacAddresses0k UnderConstruction wiki/MacAddresses0k:: UnderConstruction MacAddresses0k 0k: TmpWiki wiki/MacAddresses0k UnderConstruction wiki/MacAddresses0k:: $(NetCom)/tftpboot/redirect0k $(MakeOut) $(StartPumping) awk '/Unicast/,/Multicast/' $(pump) nocr $(pump) NoMoreCisco $(pump) gnot Unicast Multicast ^[-+]*$$ '/.*,.*/' $(pump) sed -e 's/mac address/hw /' $(pump) onhead $(pump) sed -e 's/port[s]*/ports/' $(pump) Column hw type protocols vlan ports $(pump) sed -e 's/protocols/learn/' $(pump) $(CheckOut) $(2null) $(PrependOld) $(pump) sed -e 's/[.]//g' $(pump) lioo $(pump) sorttbl -u $(pump) $(EndPumpingAndMoveThem) -$(ShowDiff) |gnot Gi5/1 0100.5e7f.fff [^0-9a-f]130[^0-9a-f] $(LockIn) $(SixOhSixIt) $(CleanUp) .PRECIOUS:: wiki/MacAddresses wiki/MacAddresses0k wiki/MacAddresses1k wiki/MacAddresses2k wiki/MacAddresses3k wiki/MacAddresses4k wiki/MacAddressesSio MacAddressesSio Sio: TmpWiki wiki/MacAddressesSio UnderConstruction wiki/MacAddressesSio:: UnderConstruction wiki/MacAddressesSio:: $(NetCom)/tftpboot/redirectSio $(MakeOut) $(StartPumping) sed -e 's/^./+/' $(pump) # asterisk for primary ignored for now sed -e 's/+ / /' $(pump) # asterisk for primary ignored for now JoinIndentNoColon $(pump) gnot egend ^$$ "-+-" $(pump) gnot Legend: ^[-+]*$$ $(pump) sed -e 's/mac address/hw /' $(pump) onhead $(pump) sed -e 's/ */,/g' $(pump) sed -e 's/[ ]*$$//g' $(pump) # Trailing tabs or spaces Column hw type learn vlan ports $(pump) $(CheckOut) # $(2null) $(PrependOld) $(pump) sed -e 's/[.]//g' $(pump) # lioo $(pump) gnot Switch,Stby-Switch $(pump) sorttbl -u $(pump) $(EndPumpingAndMoveThem) -$(ShowDiff) |gnot Gi5/1 0100.5e7f.fff [^0-9a-f]130[^0-9a-f] $(LockIn) $(SixOhSixIt) $(CleanUp) ShortenGigabitEthernet=sed -e 's;GigabitEthernet;Gi;' MacAddresses: wiki/MacAddresses wiki/MacAddresses: wiki/MacAddresses?k $(MakeOut) grep -v hw $? $(prime) egrep -v -e ' -* ' $(pump) colontab $(pump) headline box hw type learn vlan port $(pump) sed -e 's;$@;;' $(pump) $(ShortenGigabitEthernet) $(pump) Column hw vlan box port $(pump) $(PrependOld) $(pump) lioo4 $(pump) sorttbl $(pump) cat $(pump) $(EndPumpingAndMoveThem) -$(ShowDiff) |gnot Gi5/1 0100.5e7f.fff [^0-9a-f]130[^0-9a-f] $(LockIn) $(SixOhSixIt) $(CleanUp) MoreWords: #~ add stdin info to the OfficialDictionary for the wiki $(NoEcho) echo 'Paste here, followed by ^U ^D '$(WordFinder) cd wiki&&cat - |\ awk '/Results for /,/^[0-9]* words found./' |\ gnot '^[0-9]* words found.' |\ fmt -500 |\ sed -e 's. .: .' |\ sort -u |grep -v '^$$' > GrowingOfficialDictionary cd wiki&&sort -u *OfficialDictionary |\ headline word definition |\ cat > OfficialDictionaryLatest $(Echo) cd wiki&&wc *OfficialDictionary* cd wiki&&mv OfficialDictionaryLatest OfficialDictionary cd wiki&&showdiff OfficialDictionary |tee /dev/tty|wc cd wiki&&$(CiQlFaL) OfficialDictionary WhosAtHumu: Dat/WhosAtHumu Dat/WhosAtHumu: TmpDat .force #~ DoNotPublishThisInformation $(MakeOut) $(WhatEcho) garrod@Humu.ucsd.edu"'s " ssh garrod@Humu.ucsd.edu finger $(prime) onhead $(pump) Column Login Name Where $(pump) cat $@ - $(pump) sorttbl -u $(pump) $(EndPumpingAndMoveThem) -$(ShowDiffs) $(CheqInOutAndCleanUp) WhosAtNoc: Dat/WhosAtNoc Dat/WhosAtNoc: TmpDat .force #~ DoNotPublishThisInformation $(MakeOut) ssh garrod@noc.ucsd.edu finger $(prime) onhead $(pump) Column Login Name Office Phone $(pump) cat $@ - $(pump) sorttbl -u $(pump) $(EndPumpingAndMoveThem) -$(ShowDiffs) $(CheqInOutAndCleanUp) WhosAtDhcp1: Dat/WhosAtDhcp1 Dat/WhosAtDhcp1: TmpDat .force #~ DoNotPublishThisInformation $(MakeOut) ssh garrod@Dhcp1.ucsd.edu finger $(prime) onhead $(pump) Column Login Name Office Phone $(pump) cat $@ - $(pump) sorttbl -u $(pump) $(EndPumpingAndMoveThem) -$(ShowDiffs) $(CheqInOutAndCleanUp) WhosAtNetwork: Dat/WhosAtNetwork Dat/WhosAtNetwork: TmpDat .force #~ DoNotPublishThisInformation $(MakeOut) ssh garrod@Network.ucsd.edu finger $(prime) onhead $(pump) Column Login Name Office Phone $(pump) cat $@ - $(pump) sorttbl -u $(pump) $(EndPumpingAndMoveThem) -$(ShowDiffs) $(CheqInOutAndCleanUp) WhosAtGrex: Dat/WhosAtGrex #~ some names are too long for onhead to do the right thing. Dat/WhosAtGrex: TmpDat .force #~ DoNotPublishThisInformation bookerman, giantguard $(MakeOut) ssh garrod@grex.cyberspace.org finger $(prime) awk 'length($$1)<9' $(pump) onhead $(pump) rename 'Office Phone' Phone $(pump) Column Login Name Office Phone $(pump) cat $@ - $(pump) sorttbl -u $(pump) $(EndPumpingAndMoveThem) -$(ShowDiffs) $(CheqInOutAndCleanUp) MyPrograms: wiki/MyPrograms Makefile wiki/MyPrograms: Dat/Bln wiki/BinDescriptions -$(CleanUq) $(MakeOut) cat Dat/Bln $(pr1me) onemany $(pump) sed -e 's; ; SymLinks: ;' $(pump) headoff $(pump) headline program SymLinks $(pump) jointbl -c program=name wiki/BinDescriptions $(pump) Column program description SymLinks $(pump) sed -e 's;[ ]*$$;;' $(pump) sed -e 's; ; ;2' $(pump) headoff $(pump) headline MyPrograms what $(pump) rename what 'description and SymLinks if present' $(pump) cat $(pump) $(EndPumping) $(MoveThem) $(AddIdTag) $(LockIn) $(SixOhSixIt) $(CleanUp) UnusedPorts: UnderConstruction /tftpboot #~ do show interface counters into the redirect first for i in 0k 1k 2k 3k 4k ;do greplist Port ^Gi ' $E '#include ' $E '#include ' $E '#endif' $E ' ' $E '#define TRUE (0==0)' $E '#define FALSE (0!=0)' $E '#endif' $(CprDiff) FilterlUnitTest: filterl ;cat Makefile | ./filterl | diff - Makefile && $(UnameIt) filterl.c: ckg.h UnderConstruction #~ skeleton program for a line by line filter $(BeginProgram) $E '/*#define DEBUGGING debug /* Comments dont nest */' $E 'static char rcsid[] = " filterl.c,v 2.7 1997-04-18 19:52:30-07 garrod Exp " ;' $E '#include "ckg.h"' $E '#define MAXLEN 255' $E 'main(argc, argv, envp)' $E 'int argc;' $E 'char *argv[];' $E 'char *envp[];' $E '{' $E ' FILE *infile, *outfile;' $E ' char line[MAXLEN];' $E '' $E ' D(printf("There are %d arguments.\n",argc));' $E ' if (argc > 1) infile = fopen(argv[1], "r");' $E ' else infile = stdin;' $E ' if (NULL == infile) printf("Input file %s could not be opened\n", argv[1]);' $E ' if (argc > 2) outfile = fopen(argv[2], "w");' $E ' else outfile = stdout;' $E ' if (NULL == outfile) printf("Output file %s could not be opened\n", argv[2]);' $E '' $E ' while (NULL != fgets(line,MAXLEN,infile))' $E ' fprintf(outfile,"%s",line);' $E '' $E ' close ( infile);' $E ' close (outfile);' $E '}' $(CprDiff) /etc/sshd_config: $(SuDo) $E '# $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $' $E '' $E '# This is the sshd server system-wide configuration file. See' $E '# sshd_config(5) for more information.' $E '' $E '# This sshd was compiled with PATH=/bin:/usr/sbin:/sbin:/usr/bin' $E '' $E '# The strategy used for options in the default sshd_config shipped with' $E '# OpenSSH is to specify options with their default value where' $E '# possible, but leave them commented. Uncommented options change a' $E '# default value.' $E '' $E 'Port 22' $E '#Protocol 2,1' $E '#AddressFamily any' $E '#ListenAddress 0.0.0.0' $E '#ListenAddress ::' $E '' $E '# HostKey for protocol version 1' $E '#HostKey /etc/ssh_host_key' $E '# HostKeys for protocol version 2' $E '#HostKey /etc/ssh_host_rsa_key' $E '#HostKey /etc/ssh_host_dsa_key' $E '' $E '# Lifetime and size of ephemeral version 1 server key' $E '#KeyRegenerationInterval 1h' $E '#ServerKeyBits 768' $E '' $E '# Logging' $E '# obsoletes QuietMode and FascistLogging' $E '#SyslogFacility AUTH' $E '#LogLevel INFO' $E '' $E '# Authentication:' $E '' $E '#LoginGraceTime 2m' $E '#PermitRootLogin yes' $E 'StrictModes no' $E '#MaxAuthTries 6' $E '' $E '#RSAAuthentication yes' $E '#PubkeyAuthentication yes' $E '#AuthorizedKeysFile .ssh/authorized_keys' $E '' $E '# For this to work you will also need host keys in /etc/ssh_known_hosts' $E '#RhostsRSAAuthentication no' $E '# similar for protocol version 2' $E '#HostbasedAuthentication no' $E '# Change to yes if you don't trust ~/.ssh/known_hosts for' $E '# RhostsRSAAuthentication and HostbasedAuthentication' $E '#IgnoreUserKnownHosts no' $E '# Don't read the user's ~/.rhosts and ~/.shosts files' $E '#IgnoreRhosts yes' $E '' $E '# To disable tunneled clear text passwords, change to no here!' $E '#PasswordAuthentication yes' $E '#PermitEmptyPasswords no' $E '' $E '# Change to no to disable s/key passwords' $E '#ChallengeResponseAuthentication yes' $E '' $E '# Kerberos options' $E '#KerberosAuthentication no' $E '#KerberosOrLocalPasswd yes' $E '#KerberosTicketCleanup yes' $E '#KerberosGetAFSToken no' $E '' $E '# GSSAPI options' $E '#GSSAPIAuthentication no' $E '#GSSAPICleanupCredentials yes' $E '' $E '# Set this to 'yes' to enable PAM authentication, account processing, ' $E '# and session processing. If this is enabled, PAM authentication will ' $E '# be allowed through the ChallengeResponseAuthentication mechanism. ' $E '# Depending on your PAM configuration, this may bypass the setting of ' $E '# PasswordAuthentication, PermitEmptyPasswords, and ' $E '# "PermitRootLogin without-password". If you just want the PAM account and ' $E '# session checks to run without PAM authentication, then enable this but set ' $E '# ChallengeResponseAuthentication=no' $E '#UsePAM no' $E '' $E '#AllowTcpForwarding yes' $E '#GatewayPorts no' $E '#X11Forwarding no' $E '#X11DisplayOffset 10' $E '#X11UseLocalhost yes' $E '#PrintMotd yes' $E '#PrintLastLog yes' $E '#TCPKeepAlive yes' $E '#UseLogin no' $E 'UsePrivilegeSeparation no' $E '#PermitUserEnvironment no' $E '#Compression delayed' $E '#ClientAliveInterval 0' $E '#ClientAliveCountMax 3' $E '#UseDNS yes' $E '#PidFile /var/run/sshd.pid' $E '#MaxStartups 10' $E '#PermitTunnel no' $E '' $E '# no default banner path' $E '#Banner /some/path' $E '' $E '# override default of no subsystems' $E 'Subsystem sftp /usr/sbin/sftp-server' OneTimePad: ;while ThumbDrives: Dat Dat/ThumbDrive TmpDat /user/garrod/Makefile Dat/ThumbDrives: /Volumes/CHRISGARROD /Volumes/THUMBDRIVE -$(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start find $? -ls $(prime) sed -e "s;$?/;;" $(pump) sed -e "s;[4]*4870;garrod;" $(pump) findrdb $(pump) Column bk protection ln owner group size mon dy yrhm path link $(pump) $(EndPumping) $(CheckOut) # Uncomment last $(MoveThem) # change to MoveThem when looking good, nearly done -$(ShowDiffs)|rsr # optional and only for a table $(CheckIn) # uncomment for FirstCheckin DoTheNote $(CleanUp) # uncomment when deleting CleanUq above $(SendHome) # /ViPaster for CatchAll You MUST add the tab by hand # :.,$s/^ [ 0-9]*/ catchall: #~ move lines here as a way of setting them aside : # 20071113 working on BajaMonkey DiskCatalogs # 20071113.2340 BetterYet: canned AwkPatterns and remodulate for both Lex and Awk # /ViPaster for importing other code -- best for this to be at the bottom first # 20071030 still a problem with pasting tabs # /ViPaster Read it in by hand first as in :r cpr/filterl.c # :/^$/+1,$s/^/ $E '/ #{:/^$/+1,$s/$/'/ #{/'.*'.*' AwkPatterns: UnderConstruction -/bin/rm $@ $E '#!/bin/sh' $E '# $$Ckg: $$'Header'$$ $$' $E '# $$BuiltBy: $$Header: /user/garrod/RCS/Makefile,v 6.81 2008-04-29 17:02:12-07 garrod Exp garrod $$ $$' $E '# $$Key: %A% @(#) ckg - AwkPatterns - a learning pattern recognizer with UnitTests $$' $E '##############################################################################' $E '# 20050306 ItWorked as I corrected a bug in DateStamp' $E '# 20041124 UnitTestSetup:' $E '# cd ~/bin/tmp && for i in `bln AwkPatterns`;do cat ~/Dat/salaryhi ~/Dat/newnum /net/tickets/Opened/*0 | $$i > $$i 2>&1 ; dt $$i;done' $E '# 20041124 UnitTest AfterEdits:' $E '# cd ~/bin/tmp && for i in `bln AwkPatterns`;do dt $$i;cat ~/Dat/salaryhi ~/Dat/newnum /net/tickets/Opened/*0 | $$i 2>&1 | diff $$i - |sort +2 ;done|more' $E '# 20030524 an algorithm/framework has been built for verifying this logic' $E '# 20030726 this expects arg1 to be which pattern to list/match' $E '# 20031002 T#18310 Except as listed in the cases below' $E '' $E 'N=AwkPatterns' $E 'D=`dirname $$0`' $E 'P=$$D/$$N' $E 'F=`basename $$0`' $E 'case $$F in # BadIdea DataInProgram FixThisLater' $E ' # ViPaster ' $E ' AwkPatterns ) ;; # NormalInvocation' $E ' AnyUnicode |\' $E ' DateStamp |\' $E ' YyyyMmDdHhMmSs |\' $E ' EmailAddress |\' $E ' FloatingNumber |\' $E ' FullAreaCode |\' $E ' FullPhoneNumber |\' $E ' HardwareAddress |\' $E ' HiLetter |\' $E ' IpAddress |\' $E ' LatLon |\' $E ' LowLetter |\' $E ' MonthAbbreviations |\' $E ' RealNumber |\' $E ' WholeNumber |\' $E ' WikiWord |\' $E ' SevenDigits |\' $E ' EightDigits |\' $E ' NineDigits |\' $E ' TenDigits |\' $E ' ElevenDigits |\' $E ' TwelveDigits |\' $E ' ThirteenDigits |\' $E ' FourteenDigits |\' $E ' FifteenDigits |\' $E ' SixteenDigits |\' $E ' SeventeenDigits |\' $E ' EighteenDigits |\' $E ' NineteenDigits |\' $E ' TwentyDigits |\' $E ' SevenHexDigits |\' $E ' EightHexDigits |\' $E ' NineHexDigits |\' $E ' TenHexDigits |\' $E ' ElevenHexDigits |\' $E ' TwelveHexDigits |\' $E ' ThirteenHexDigits |\' $E ' FourteenHexDigits |\' $E ' FifteenHexDigits |\' $E ' SixteenHexDigits |\' $E ' SeventeenHexDigits |\' $E ' EighteenHexDigits |\' $E ' NineteenHexDigits |\' $E ' TwentyHexDigits |\' $E ' SomethingIhaveNotThoughtOfYet ) $$P $$F' $E '' $E ' exit # EarlyExit to prevent further recursion' $E ' ;;' $E ' * ) echo $$F unknown in program $$P' $E 'esac # that is all the ShellScript the rest is AwkScript' $E '' $E "awk '" $E '' $E 'BEGIN { FS = OFS = " "' $E ' FileName = "-" # dont print name when its stdin' $E ' begin = "^"' $E ' end = "$$"' $E '' $E ' left = "("' $E ' or = "|"' $E ' right = ")"' $E ' LeftParen ="\\(" # literals used in AreaCode' $E ' RightParen ="\\)" # literals used in AreaCode' $E ' Ampersand ="\\&"' $E ' dot = "\." # special meaning in patterns' $E ' DotStar = "\.\*" # special meaning in patterns' $E ' period = "\\." # special meaning in patterns' $E ' bell = "\a" # from the GrayWall' $E ' at = "@"' $E ' slash = "/"' $E ' colon = ":"' $E ' Minus = "-"' $E ' Plus = "\\+"' $E ' space = " "' $E ' dash = Minus' $E ' Dash = dash' $E ' ex = "x" ' $E ' pound = "#" ' $E '' $E ' NoneOrOne = "?"' $E ' ZeroOrOne = NoneOrOne' $E ' OneOrMore = "+"' $E ' NoneOrMore = "*"' $E '' $E ' WhiteSpace = "[ ]"' $E ' MaybeWhiteSpace = MaybeSome( WhiteSpace )' $E ' MaybeDash = MaybeSome( Dash )' $E '' $E ' zero = "0"' $E ' one = "1"' $E ' two = "2"' $E ' five = "5"' $E ' OhOne = "[0-1]" # maxed in months and ampm hours' $E ' OhTwo = "[0-2]" # used in 24 hours and some parts of months' $E ' OhThree = "[0-3]" # in days and hours ' $E ' ohfour = "[0-4]" # in ip addresses ' $E ' ohfive = "[0-5]" # overloaded in 59 min or sec, or 255 in bits' $E ' digit = "[0-9]"' $E ' OneOne = "11" # building 1k has one floor' $E ' OneNine = "[1-9]"' $E ' AnyUnicode = "."' $E ' LowLetter = "[a-z]"' $E ' HiLetter = "[A-Z]"' $E ' letters = OneOf( LowLetter , HiLetter )' $E ' SomeLetters = some( letters )' $E ' SomeSpaces = some( space )' $E '' $E '# HexaDecimal is used in HardwareAddresses and other GeekStuff' $E ' hexa = "[a-fA-F]"' $E ' HexDigit = OneOf( digit , hexa )' $E ' HexByte = HexDigit HexDigit' $E ' ShortHexByte = OneOf( HexByte , HexDigit ) # omits leading 0' $E ' HexByteColon = ShortHexByte colon' $E ' HexByteDash = HexByte Dash' $E ' HexQuad = HexByte HexByte' $E ' HexQuadDot = HexQuad period' $E ' HexDigits = some( HexDigit )' $E '# Here we begin to address the possibililty of recognizing a variety' $E '# of inputs with a desire to get that right, and then to emit a standard' $E ' PlainHardwareAddress = HexQuad HexQuad HexQuad' $E ' CiscoHardwareAddress = HexQuadDot HexQuadDot HexQuad' $E ' ColonHardwareAddress = HexByteColon HexByteColon HexByteColon HexByteColon HexByteColon ShortHexByte' $E ' DashHardwareAddress = HexByteDash HexByteDash HexByteDash HexByteDash HexByteDash HexByte' $E '# dash form in show cam dynamic' $E '# sometimes the colon addresses do not have a leading zero' $E ' OtherFormOfHardwareAddress = OneOf( ColonHardwareAddress , CiscoHardwareAddress )' $E ' AnOtherFormOfHardwareAddress = OneOf( DashHardwareAddress , OtherFormOfHardwareAddress )' $E ' HardwareAddress = OneOf( PlainHardwareAddress , AnOtherFormOfHardwareAddress )' $E ' SomeDigits = some( digit )' $E ' Integer = SomeDigits' $E ' PosOrNeg = OneOf( Plus , Minus )' $E ' SignSymbol = PosOrNeg' $E ' WholeNumber = MaybeOne( SignSymbol ) Integer' $E ' MaybeDecimalDigits = MaybeOne( period SomeDigits )' $E ' RealNumber = WholeNumber MaybeDecimalDigits' $E ' EforExponent = OneOf( "E" , "e" )' $E ' FloatingNumber = RealNumber MaybeOne( EforExponent WholeNumber )' $E '' $E ' NorthSouth = "[NnSs]"' $E ' EastWest = "[EeWw]"' $E ' LatLon = RealNumber NorthSouth EastWest RealNumber' $E '' $E ' NotSixty = ohfive digit # used in minutes and seconds, beware on leap ' $E ' seconds = NotSixty SomeDigits' $E ' MaybeSeconds = MaybeOne( seconds )' $E ' MaybeMinutesAndMore = MaybeOne( NotSixty MaybeSeconds )' $E ' hours = OneOf( OhOne digit , two OhThree ) # 00-23' $E ' TimeStamp = hours MaybeMinutesAndMore' $E ' AndTime = MaybeOne( period TimeStamp )' $E ' HhMmSs = hours NotSixty NotSixty # There is NoMaybe here' $E '' $E ' to9 = digit # 0-9' $E ' to99 = to9 NoneOrOne # 0-99' $E ' to999 = to99 to9 NoneOrOne # 0-999' $E '' $E ' TwoDigits = digit digit # 00-99' $E ' OneOrTwoDigits = OneOf( to9 , TwoDigits )' $E ' ThreeDigits = digit TwoDigits' $E ' FourDigits = digit ThreeDigits' $E ' FiveDigits = digit FourDigits' $E ' SixDigits = digit FiveDigits' $E ' SevenDigits = digit SixDigits' $E ' EightDigits = digit SevenDigits' $E ' NineDigits = digit EightDigits' $E ' TenDigits = digit NineDigits' $E ' ElevenDigits = digit TenDigits' $E ' TwelveDigits = digit ElevenDigits' $E ' ThirteenDigits = digit TwelveDigits' $E ' FourteenDigits = digit ThirteenDigits' $E ' FifteenDigits = digit FourteenDigits' $E ' SixteenDigits = digit FifteenDigits' $E ' SeventeenDigits = digit SixteenDigits' $E ' EighteenDigits = digit SeventeenDigits' $E ' NineteenDigits = digit EighteenDigits' $E ' TwentyDigits = digit NineteenDigits' $E '' $E ' TwoHexDigits = HexDigit HexDigit' $E ' ThreeHexDigits = HexDigit TwoHexDigits' $E ' FourHexDigits = HexDigit ThreeHexDigits' $E ' FiveHexDigits = HexDigit FourHexDigits' $E ' SixHexDigits = HexDigit FiveHexDigits' $E ' SevenHexDigits = HexDigit SixHexDigits' $E ' EightHexDigits = HexDigit SevenHexDigits' $E ' NineHexDigits = HexDigit EightHexDigits' $E ' TenHexDigits = HexDigit NineHexDigits' $E ' ElevenHexDigits = HexDigit TenHexDigits' $E ' TwelveHexDigits = HexDigit ElevenHexDigits' $E ' ThirteenHexDigits = HexDigit TwelveHexDigits' $E ' FourteenHexDigits = HexDigit ThirteenHexDigits' $E ' FifteenHexDigits = HexDigit FourteenHexDigits' $E ' SixteenHexDigits = HexDigit FifteenHexDigits' $E ' SeventeenHexDigits = HexDigit SixteenHexDigits' $E ' EighteenHexDigits = HexDigit SeventeenHexDigits' $E ' NineteenHexDigits = HexDigit EighteenHexDigits' $E ' TwentyHexDigits = HexDigit NineteenHexDigits' $E ' ' $E ' TicketNumber = "T" pound FiveDigits ' $E ' IgppFloor = enclose( zero OhThree or OneOne or "[234][12]" or "43" )' $E ' BiscuitNumber = IgppFloor zero TwoDigits' $E '' $E ' AreaCode = enclose( LeftParen ThreeDigits RightParen MaybeSome( SomeSpaces ) ) # (858)' $E ' FullAreaCode = OneOf( AreaCode , ThreeDigits dash )' $E ' extension = enclose( ex SomeDigits )' $E ' PhoneNumber = ThreeDigits dash FourDigits # this is only part of it' $E ' FullPhoneNumber = enclose( MaybeOne( FullAreaCode ) PhoneNumber MaybeOne( extension ) ) # in TestList' $E '' $E ' twelve = OneOf( zero digit , one OhTwo ) # 00-12 TheMonths' $E ' TwentyNine = twelve OhTwo digit # doesnt prevent most Feb 29ths' $E ' thirty = OneOf( "0[13-9]" , one OhTwo ) "30" # months with 30' $E ' ThirtyOne = OneOf( "0[13578]" , one "[02]" ) "31" # and 31' $E ' MonthDays = enclose( TwentyNine or thirty or ThirtyOne )' $E ' hundreds = "19|20" # not centuries, OffByOne' $E ' RecentYear = enclose( hundreds ) TwoDigits' $E ' # 19|20 yyyy mm mmdd .hhmmssssss to any precision' $E ' Date = RecentYear MonthDays' $E ' DateStamp = Date AndTime ' $E ' YyyyMmDdHhMmSs = Date HhMmSs' $E '' $E ' PlusFour = dash FourDigits' $E ' ZipCode = FiveDigits MaybeOne( PlusFour)' $E '' $E ' DecimalByte = enclose( digit or TwoDigits or one TwoDigits or two enclose( ohfour digit or five ohfive ) ) # 0-255' $E ' IpAddress = enclose( DecimalByte period DecimalByte period DecimalByte period DecimalByte ) # in TestList' $E ' UpWord = HiLetter some( LowLetter )' $E ' AcroNym = some( HiLetter ) # in TestList' $E ' WikiWord = UpWord some( OneOf( UpWord , DateStamp ) ) # in TestList' $E ' WikiWord2be = enclose( UpWord SomeSpaces MaybeSome( UpWord SomeSpaces ) UpWord )' $E ' pattern = begin DateStamp end' $E ' all = enclose( WikiWord or DateStamp or IpAddress or FullPhoneNumber )' $E ' # SeeProgram: PatternTesting' $E '' $E ' HyperTextTransportProtocol = "[hH][tT][pP][pP]"' $E ' ColonSlashSlash = colon slash slash' $E ' WebUrl = HyperTextTransportProtocol ColonSlashSlash DotStar' $E '' $E ' HostName = SomeLetters MaybeSome( period SomeLetters )' $E ' UserName = SomeLetters' $E ' EmailAddress = UserName at HostName' $E '' $E '} # end BEGIN' $E '' $E 'FileName != FILENAME { FileName = FILENAME ; print "FileName " FileName }' $E '' $E '$$0 ~ /$$1/ {showmebetter(\"'$$1'\",'$$1',$$0)}' $E '$$0 ~ '$$1' {markup("'$$1'",'$$1',$$0)}' $E '' $E 'END { for ( i in a ) print a[i], i' $E ' print "-- -------"' $E ' for ( i in MatchList ) print MatchList[i] , i' $E '' $E '}' $E '' $E 'function enclose( x ) { return left x right }' $E 'function MaybeSome( x ) { return enclose( x ) NoneOrMore }' $E 'function MaybeOne( x ) { return enclose( x ) NoneOrOne }' $E 'function some( x ) { return enclose( x ) OneOrMore }' $E 'function OneOf( x,y ) { return enclose( x or y ) }' $E '' $E 'function showmebetter(st,pat,str ,s){ # name and pattern and $$0 ' $E ' local s' $E ' s=str' $E ' match(str,pat)' $E ' Match = substr( str , RSTART , RLENGTH )' $E ' MatchList[ Match ] ++' $E ' a[st]+=gsub(pat,st "_|&|_",s)' $E ' # print "showmebetter",a[st],st,s' $E '}' $E '' $E 'function markup(st,pat,str){ # emit what the web server can interpret' $E ' a[st]=gsub(pat,"" ,str)' $E '}' $E '' $E ' '' |' $E 'table' diff -b $@ Bin/$@ |PipeLess TcpTuning: /usr/sbin/sysctl sudo #~ MacOnly from http://www.psc.edu/networking/projects/tcptune/#MacOS sudo /usr/sbin/sysctl -w kern.ipc.maxsockbuf=9000000 net.inet.tcp.sendspace=4000000 net.inet.tcp.recvspace=4000000 UnDoTcpTuning: sudo /usr/sbin/sysctl #~ MacOnly from http://www.psc.edu/networking/projects/tcptune/#MacOS sudo /usr/sbin/sysctl -w kern.ipc.maxsockbuf=262144 net.inet.tcp.sendspace=32768 net.inet.tcp.recvspace=32768 DotExrc: $W/DotExrc $W/DotExrc: .exrc ;cat $? > $@ && $(AddIdTag) && $(SixOhSixIt) MoreThanEarthQuakeTowns=grep -lv '(^[.0-9nw]*$$|TownNear.EarthQuakes|garrod.Exp)' GoogleMailFilters: #~ add stdin info to the OfficialDictionary for the wiki $(NoEcho) $(WhatEcho) 'Paste here, followed by ^D ' cat - |\ awk '/The following filters are applied to all incoming mail:/,/Create a new filter/' |\ $(ObfuscateEmailAddresses) |\ qdt $@ $(Echo) RsyncErrors$(WhichDay): Makefile wiki/RsyncErrors$(WhichDay) RsyncLog$(WhichDay): Makefile wiki/RsyncLog$(WhichDay) RsyncSummary$(WhichDay): Makefile wiki/RsyncSummary$(WhichDay) wiki/RsyncErrors$(WhichDay): $(RsyncLogs)/$(WhichDay)* wiki/RsyncLog$(WhichDay): $(RsyncLogs)/$(WhichDay)* wiki/RsyncSummary$(WhichDay): $(RsyncLogs)/$(WhichDay)* -$(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start cat $? $(prime) $(CutLongLines) $(pump) awk ' \ /^200/ {n=split($$2,a,"/");printf "\n%s\t%s",$$1,a[n]} \ /files transferred:/ {printf "\t%s",$$NF} \ /transferred file size/ {printf "\t%s",$$(NF-1)} \ /real.*user.*sys/ {printf "\t%.2f\t%.2f\t%.2f\t%.2f\t",$$1,$$3,$$5,$$1-$$3-$$5} \ /\/RsyncLoop,v/ {printf "%s\tVersion %s\nwhen\tuser \tfiles \tbytes \tseconds \tuser \tsys \tiowait \t\n-\t-\t-\t-\t-\t-\t-\t-\t",$$1,$$2} \ ' $(pump) BetterComma $(pump) $(NoThreeCommas) $(pump) # they were in date stamps $(EndPumpingAndMoveThem) $(SixOhSixIt) $(AddIdTag) #$(MoreThem) $(CleanUp) LibraryDays: UnderConstruction ;cd wiki&&grep -l LibraryDay *|qdt $@ RoutingAtTheArcola: sudo # for BajaMonkey wired to HostSophomore netstat -rn|greplist ^[dD0-9]|onhead sudo route delete default 172.16.154.193 sudo route add default 10.0.2.1 netstat -rn|greplist ^[dD0-9]|onhead SupportHistory: $W/SupportHistory $W/SupportHistory: ~dbs/support ; ( cd `dirname $?`&&showdiff -b -c -100 `basename $?`) > $@ EarthQuakesThreePlus: $W/EarthQuakesThreePlus $W/EarthQuakesThreePlus: $W/EarthQuakes ;greplist<$? DateStamp '^[-2]' |Row mag ge 3 >$@ && $(AddIdTag) CalendarImageSource=/Library/Application\ Support/Now\ Software/Event\ Servers/714FA1B1-D0A0-440F-B903-1FB9A94D31FF/Images/* CalendarImages=/Library/WebServer/Documents/igppcal/Calendar/Images $(CalendarImages): ;$(MakeDirIfNeeded) FixCalendar: $(CalendarImages) ;$(sudo) cp -p $(CalendarImageSource) $(CalendarImages) # 20080128 put FixCalendar in cron@igppweb (Home1) 23,53 * * * * Bin/mash FixCalendar KeepFixingCalendar: sudo ;while true; do while test -f $(CalendarImages)/1.gif; do SleepTillMinuteStarts; done; make -s FixCalendar; dt FixedCalendar; done & RsyncDays: RsyncFriday RsyncMonday RsyncSaturday RsyncSunday RsyncThursday RsyncTuesday RsyncWednesday RsyncFriday: RsyncSummaryFriday RsyncErrorsFriday RsyncLogFriday RsyncMonday: RsyncSummaryMonday RsyncErrorsMonday RsyncLogMonday RsyncSaturday: RsyncSummarySaturday RsyncErrorsSaturday RsyncLogSaturday RsyncSunday: RsyncSummarySunday RsyncErrorsSunday RsyncLogSunday RsyncThursday: RsyncSummaryThursday RsyncErrorsThursday RsyncLogThursday RsyncTuesday: RsyncSummaryTuesday RsyncErrorsTuesday RsyncLogTuesday RsyncWednesday: RsyncSummaryWednesday RsyncErrorsWednesday RsyncLogWednesday RsyncLogSunday: Makefile wiki/RsyncLogSunday wiki/RsyncLogSunday: Makefile $(MakeIt) RsyncLogToday WeekDay=Sunday mv wiki/RsyncLogSunday $@ #RsyncLogMonday: Makefile wiki/RsyncLogMonday #wiki/RsyncLogMonday: Makefile $(MakeIt) RsyncLogToday WeekDay=Monday mv wiki/RsyncLogMonday $@ RsyncLogWednesday: Makefile wiki/RsyncLogWednesday wiki/RsyncLogWednesday: $(RsyncLogs)/$(WeekDay) $(MakeIt) RsyncLogToday WeekDay=Wednesday mv wiki/RsyncLogWednesday $@ | grep -v are.identical RsyncLogThursday: Makefile wiki/RsyncLogThursday wiki/RsyncLogThursday: $(RsyncLogs)/$(WeekDay) $(MakeIt) RsyncLogToday WeekDay=Thursday mv wiki/RsyncLogThursday $@ RsyncLogFriday: Makefile wiki/RsyncLogFriday wiki/RsyncLogFriday: $(RsyncLogs)/$(WeekDay) $(MakeIt) RsyncLogToday WeekDay=Friday mv wiki/RsyncLogFriday $@ RsyncLogSaturday: Makefile wiki/RsyncLogSaturday wiki/RsyncLogSaturday: $(RsyncLogs)/$(WeekDay) $(MakeIt) RsyncLogToday WeekDay=Saturday mv wiki/RsyncLogSaturday $@ RsyncErrorsSunday: Makefile wiki/RsyncErrorsSunday wiki/RsyncErrorsSunday: $(RsyncLogs)/$(WeekDay) $(MakeIt) RsyncErrorsToday WeekDay=Sunday mv wiki/RsyncErrorsSunday $@ RsyncErrorsWednesday: Makefile wiki/RsyncErrorsWednesday wiki/RsyncErrorsWednesday: $(RsyncLogs)/$(WeekDay) $(MakeIt) RsyncErrorsToday WeekDay=Wednesday mv wiki/RsyncErrorsWednesday $@ | grep -v are.identical RsyncErrorsThursday: Makefile wiki/RsyncErrorsThursday wiki/RsyncErrorsThursday: $(RsyncLogs)/$(WeekDay) $(MakeIt) RsyncErrorsToday WeekDay=Thursday mv wiki/RsyncErrorsThursday $@ RsyncErrorsFriday: Makefile wiki/RsyncErrorsFriday wiki/RsyncErrorsFriday: $(RsyncLogs)/$(WeekDay) $(MakeIt) RsyncErrorsToday WeekDay=Friday mv wiki/RsyncErrorsFriday $@ RsyncErrorsSaturday: Makefile wiki/RsyncErrorsSaturday wiki/RsyncErrorsSaturday: $(RsyncLogs)/$(WeekDay) $(MakeIt) RsyncErrorsToday WeekDay=Saturday mv wiki/RsyncErrorsSaturday $@ RootServers=http://www.internic.net/zones/named.root RootServers: wiki/RootServers Tmp/RootServers: .force ;$(WgetIt) $(RootServers) wiki/RootServers: Tmp/RootServers -$(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start $(StartPumping) # just cats prereq's or command $(prime) or $(pr1me) gnot '^;' $(pump) whitetabs $(pump) $(EndPumping) #SometimesHandy: test -f $@ && diff $@ `cat $T.out` #$(CheckOut) # Uncomment last $(MoveThem) # change to MoveThem when looking good, nearly done $(SixOhSixIt) $(AddIdTag) $(AddLine) DataFrom' '$(RootServers) $(CleanUp) # uncomment when deleting CleanUq above RecordWireless: sudo ;sudo tcpdump -s 1777 -w /tmp/$today -C 1 -i en1 & PlayBackWireless: ;cat /tmp/$today*|tcpdump -r - WikiWordsInMyMakefile: wiki/WikiWordsInMyMakefile wiki/WikiWordsInMyMakefile: Makefile $(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start $(StartPumping) # just cats prereq's or command $(prime) or $(pr1me) cat Makefile $(pump) 1col $(pump) WikiWord $(pump) rdb2RDB $(pump) sorttbl $(pump) onemany $(pump) headoff $(pump) sort -rn $(pump) headline Number WikiWords $(pump) $(EndPumping) $(MoveThem) $(SixOhSixIt) $(AddIdTag) $(CleanUp) DateStampsInMyMakefile: wiki/DateStampsInMyMakefile wiki/DateStampsInMyMakefile: Makefile $(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start $(StartPumping) # just cats prereq's or command $(prime) or $(pr1me) cat Makefile $(pump) 1col $(pump) DateStamp $(pump) rdb2RDB $(pump) sorttbl $(pump) onemany $(pump) headoff $(pump) sort -rn $(pump) headline Number DateStamps $(pump) $(EndPumping) $(MoveThem) $(SixOhSixIt) $(AddIdTag) $(CleanUp) IpAddressesInMyMakefile: wiki/IpAddressesInMyMakefile wiki/IpAddressesInMyMakefile: Makefile $(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start $(StartPumping) # just cats prereq's or command $(prime) or $(pr1me) cat Makefile $(pump) 1col $(pump) IpAddress $(pump) rdb2RDB $(pump) sorttbl $(pump) onemany $(pump) headoff $(pump) sort -rn $(pump) headline Number IpAddresses $(pump) $(EndPumping) $(MoveThem) $(SixOhSixIt) $(AddIdTag) $(CleanUp) MakefileAnalyses: WikiWordsInMyMakefile DateStampsInMyMakefile IpAddressesInMyMakefile RogersBookList: TmpWiki wiki/RogersBookList wiki/RogersBookList: UnderConstruction psswrd roger echo "https://roger.ucsd.edu/patroninfo/1030387/top/" echo Cut and Paste everything from the Roger listing page next: $(MakeOut) $(NoEcho) && cat - $(prime) && $(NowEcho) awk '/^RENEW..TITLE..BARCODE/,/Roger.gadget/' $(pump) awk 'BEGIN {OFS=FS=" " } ;\ $$3=="" {title=$$2} ;\ NF==4 {n=split($$3,a,"[- ]") ;\ print "20"a[4]a[2]a[3]"."a[6],$$4,title} ;\ END {print summary} ;\ ' $(pump) sqz $(pump) headline Date.Renewals LOC TitleAndAuthors $(pump) sorttbl $(pump) gnot "^$$" "^[- ]*$$" $(pump) $(EndPumpingAndMoveThem) $(AddIdTag) test ! -t 1||$(ShowDiff)|grep -v '$$Id'|table $(LockIn) $(SixOhSixIt) $(CleanUp) WikiSanityCheck: echo $W/* $W/RCS/*|xargs ls -ld TailLogs: $(AccessLog) $(ErrorLog) psgrep tail|gnot $@|killthem for i in $?;do tail -f $$i & done WhosAt: Dat/dependencies ;make -ks `grep '^WhosAt[A-Z]' $?|first` wiki/ScrabbleLastGameMoves: Tmp/ScrabbleLastGameUnMarkedUp -$(CleanUq) $(MakeOut) $(StartPumping) greplist Turn Rack Score: points $(pump) tolower $(pump) 2tab -gf' ' $(pump) sed -e 's/[()]//g' $(pump) $B/scrawk $(pump) $(EndPumpingAndMoveThem) $(AddIdTag) #$(CleanUp) MacWtmp=/private/var/log/wtmp* PrismWtmp=/var/log/wtmp* LongLast: echo '' >/tmp/wtmp for i in `ls -rt $(MacWtmp) $(PrismWtmp)`;do gzcat $i || cat $i;done >>/tmp/wtmp last -f /tmp/wtmp john-1.7.2: JohnTheRipper ;gzcat $? | tar -xvf -&& cd $@ && make -k clean solaris-sparc64-gcc LN='ln -s' JohnTheRipper=http://www.openwall.com/john/f/john-1.7.2.tar.gz JtrHomePage=http://www.openwall.com/john/ JohnTheRipper: JtrHomePage ;$(WgetIt) $(JohnTheRipper) JtrHomePage: ;$(WgetIt) $(JtrHomePage) && grep $(JohnTheRipper) $@ DefaultsRead: ;scp $(SshHomeBase) ReReadHttpdConf: /etc/apache/httpd.conf /var/run/apache/httpd.pid sudo ;$(sudo) kill -HUP `$(sudo) cat /var/run/apache/httpd.pid` OneThirtyOne= `seq 1 31` OneThirty= `seq 1 30` OneTwentyEight= `seq 1 28` OneNine= `seq 1 9` WebViewers: $(AccessLog) for i in $(OneNine) ;do grep 0$$i/Mar/2008 $(AccessLog) |ApacheLogging|qdt Viewers2008030$$i;done WebTests=http://igpp/ http://igpp.ucsd.edu http://mahi.ucsd.edu http://humu.ucsd.edu http://mahi/cgi-bin/ChrisGarrod?TodaysPage http://mahi/shearer/JCLUB/clint.jpeg WebTests: /usr/bin/open ;for i in $(WebTests);do open $$i & done HisTab:;~ makes appendhistory properly # 20080110 I'm grabbing these to see how stuff changes. Does this become a loop? RalphAndLanna: /tmp/Dat/dua /tmp/Dat/find /tmp/Dat/dua: /tmp/Dat/sent ;du -a /cygdrive/c >$@ /tmp/Dat/find: /tmp/Dat/sent ;find /cygdrive/c -ls >$@ /tmp/Dat/sent: /cygdrive/c scp -C /tmp/Dat/dua $(HomeBase):Dat/RalphAndLannaDua scp -C /tmp/Dat/find $(HomeBase):Dat/RalphAndLannaFind touch $@ PostFix= sudo /usr/sbin/postfix PostQueue= sudo /usr/sbin/postqueue SendMail= sudo /usr/sbin/sendmail PostFix: /usr/sbin/postfix sudo #~ tried once on PodOne 20071214 $(PostFix) check $(PostFix) start $(PostQueue) -f $(SendMail) -bp MakeProgram: #~ it is not always available on new mac installs tellme The DevelopersKit ought to be installed on $(HostName) echo $(SCP) freefall:/usr/bin/make $(ckg)/make MakeProgram=http://prep.ai.mit.edu/gnu/make/make-3.81.tar.bz2 # 20080115 Tmp/MakeProgram: ;$(WgetIt) $(MakeProgram) MakeProgram: Tmp/MakeProgram MyCookies: Library/Cookies/Cookies.plist file $? $(ToXml) $? file $? BunchOfLaws: ;wl law |qdt $@ UserHomes: wiki/UserHomes wiki/UserHomes: ;ypcat passwd|$B/NoPasswds|colontabs|headline user uid gid full home shell|Column user home > $@ && $(AddIdTag) md5.c: $E '/*' $E ' **********************************************************************' $E ' ** md5.h -- Header file for implementation of MD5 **' $E ' ** RSA Data Security, Inc. MD5 Message Digest Algorithm **' $E ' ** Created: 2/17/90 RLR **' $E ' ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **' $E ' ** Revised (for MD5): RLR 4/27/91 **' $E ' ** -- G modified to have y&~z instead of y&z **' $E ' ** -- FF, GG, HH modified to add in last register done **' $E ' ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 **' $E ' ** -- distinct additive constant for each step **' $E ' ** -- round 4 added, working mod 7 **' $E ' **********************************************************************' $E ' */' $E '/*' $E ' **********************************************************************' $E ' ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **' $E ' ** **' $E ' ** License to copy and use this software is granted provided that **' $E ' ** it is identified as the "RSA Data Security, Inc. MD5 Message **' $E ' ** Digest Algorithm" in all material mentioning or referencing this **' $E ' ** software or this function. **' $E ' ** **' $E ' ** License is also granted to make and use derivative works **' $E ' ** provided that such works are identified as "derived from the RSA **' $E ' ** Data Security, Inc. MD5 Message Digest Algorithm" in all **' $E ' ** material mentioning or referencing the derived work. **' $E ' ** **' $E ' ** RSA Data Security, Inc. makes no representations concerning **' $E ' ** either the merchantability of this software or the suitability **' $E ' ** of this software for any particular purpose. It is provided "as **' $E ' ** is" without express or implied warranty of any kind. **' $E ' ** **' $E ' ** These notices must be retained in any copies of any part of this **' $E ' ** documentation and/or software. **' $E ' **********************************************************************' $E ' */' $E '/* typedef a 32 bit type */' $E 'typedef unsigned long int UINT4;' $E '/* Data structure for MD5 (Message Digest) computation */' $E 'typedef struct {' $E ' UINT4 i[2]; /* number of _bits_ handled mod 2^64 */' $E ' UINT4 buf[4]; /* scratch buffer */' $E ' unsigned char in[64]; /* input buffer */' $E ' unsigned char digest[16]; /* actual digest after MD5Final call */' $E '} MD5_CTX;' $E 'void MD5Init ();' $E 'void MD5Update ();' $E 'void MD5Final ();' $E '/*' $E ' **********************************************************************' $E ' ** End of md5.h **' $E ' ******************************* (cut) ********************************' $E ' */' $E '/*' $E ' **********************************************************************' $E ' ** md5.c **' $E ' ** RSA Data Security, Inc. MD5 Message Digest Algorithm **' $E ' ** Created: 2/17/90 RLR **' $E ' ** Revised: 1/91 SRD,AJ,BSK,JT Reference C Version **' $E ' **********************************************************************' $E ' */' $E '/*' $E ' **********************************************************************' $E ' ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **' $E ' ** **' $E ' ** License to copy and use this software is granted provided that **' $E ' ** it is identified as the "RSA Data Security, Inc. MD5 Message **' $E ' ** Digest Algorithm" in all material mentioning or referencing this **' $E ' ** software or this function. **' $E ' ** **' $E ' ** License is also granted to make and use derivative works **' $E ' ** provided that such works are identified as "derived from the RSA **' $E ' ** Data Security, Inc. MD5 Message Digest Algorithm" in all **' $E ' ** material mentioning or referencing the derived work. **' $E ' ** **' $E ' ** RSA Data Security, Inc. makes no representations concerning **' $E ' ** either the merchantability of this software or the suitability **' $E ' ** of this software for any particular purpose. It is provided "as **' $E ' ** is" without express or implied warranty of any kind. **' $E ' ** **' $E ' ** These notices must be retained in any copies of any part of this **' $E ' ** documentation and/or software. **' $E ' **********************************************************************' $E ' */' $E '/* -- include the following line if the md5.h header file is separate -- */' $E '/* #include "md5.h" */' $E '/* forward declaration */' $E 'static void Transform ();' $E 'static unsigned char PADDING[64] = {' $E ' 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,' $E ' 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,' # md5 Padding 2 $E ' 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,' # md5 Padding 3 $E ' 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,' # md5 Padding 4 $E ' 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,' # md5 Padding 5 $E ' 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,' # md5 Padding 6 $E ' 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,' # md5 Padding 7 $E ' 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00' $E '};' $E '/* F, G and H are basic MD5 functions: selection, majority, parity */' $E '#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))' $E '#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))' $E '#define H(x, y, z) ((x) ^ (y) ^ (z))' $E '#define I(x, y, z) ((y) ^ ((x) | (~z))) ' $E '/* ROTATE_LEFT rotates x left n bits */' $E '#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))' $E '/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4 */' $E '/* Rotation is separate from addition to prevent recomputation */' $E '#define FF(a, b, c, d, x, s, ac) \' $E ' {(a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \' $E ' (a) = ROTATE_LEFT ((a), (s)); \' $E ' (a) += (b); \' $E ' }' $E '#define GG(a, b, c, d, x, s, ac) \' $E ' {(a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \' $E ' (a) = ROTATE_LEFT ((a), (s)); \' $E ' (a) += (b); \' $E ' }' $E '#define HH(a, b, c, d, x, s, ac) \' $E ' {(a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \' $E ' (a) = ROTATE_LEFT ((a), (s)); \' $E ' (a) += (b); \' $E ' }' $E '#define II(a, b, c, d, x, s, ac) \' $E ' {(a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \' $E ' (a) = ROTATE_LEFT ((a), (s)); \' $E ' (a) += (b); \' $E ' }' $E 'void MD5Init (mdContext)' $E 'MD5_CTX *mdContext;' $E '{' $E ' mdContext->i[0] = mdContext->i[1] = (UINT4)0;' $E ' /* Load magic initialization constants.' $E ' */' $E ' mdContext->buf[0] = (UINT4)0x67452301;' $E ' mdContext->buf[1] = (UINT4)0xefcdab89;' $E ' mdContext->buf[2] = (UINT4)0x98badcfe;' $E ' mdContext->buf[3] = (UINT4)0x10325476;' $E '}' $E 'void MD5Update (mdContext, inBuf, inLen)' $E 'MD5_CTX *mdContext;' $E 'unsigned char *inBuf;' $E 'unsigned int inLen;' $E '{' $E ' UINT4 in[16];' $E ' int mdi;' $E ' unsigned int i, ii;' $E ' /* compute number of bytes mod 64 */' $E ' mdi = (int)((mdContext->i[0] >> 3) & 0x3F);' $E ' /* update number of bits */' $E ' if ((mdContext->i[0] + ((UINT4)inLen << 3)) < mdContext->i[0])' $E ' mdContext->i[1]++;' $E ' mdContext->i[0] += ((UINT4)inLen << 3);' $E ' mdContext->i[1] += ((UINT4)inLen >> 29);' $E ' while (inLen--) {' $E ' /* add new character to buffer, increment mdi */' $E ' mdContext->in[mdi++] = *inBuf++;' $E ' /* transform if necessary */' $E ' if (mdi == 0x40) {' $E ' for (i = 0, ii = 0; i < 16; i++, ii += 4)' $E ' in[i] = (((UINT4)mdContext->in[ii+3]) << 24) |' $E ' (((UINT4)mdContext->in[ii+2]) << 16) |' $E ' (((UINT4)mdContext->in[ii+1]) << 8) |' $E ' ((UINT4)mdContext->in[ii]);' $E ' Transform (mdContext->buf, in);' $E ' mdi = 0;' $E ' }' $E ' }' $E '}' $E 'void MD5Final (mdContext)' $E 'MD5_CTX *mdContext;' $E '{' $E ' UINT4 in[16];' $E ' int mdi;' $E ' unsigned int i, ii;' $E ' unsigned int padLen;' $E ' /* save number of bits */' $E ' in[14] = mdContext->i[0];' $E ' in[15] = mdContext->i[1];' $E ' /* compute number of bytes mod 64 */' $E ' mdi = (int)((mdContext->i[0] >> 3) & 0x3F);' $E ' /* pad out to 56 mod 64 */' $E ' padLen = (mdi < 56) ? (56 - mdi) : (120 - mdi);' $E ' MD5Update (mdContext, PADDING, padLen);' $E ' /* append length in bits and transform */' $E ' for (i = 0, ii = 0; i < 14; i++, ii += 4)' $E ' in[i] = (((UINT4)mdContext->in[ii+3]) << 24) |' $E ' (((UINT4)mdContext->in[ii+2]) << 16) |' $E ' (((UINT4)mdContext->in[ii+1]) << 8) |' $E ' ((UINT4)mdContext->in[ii]);' $E ' Transform (mdContext->buf, in);' $E ' /* store buffer in digest */' $E ' for (i = 0, ii = 0; i < 4; i++, ii += 4) {' $E ' mdContext->digest[ii] = (unsigned char)(mdContext->buf[i] & 0xFF);' $E ' mdContext->digest[ii+1] =' $E ' (unsigned char)((mdContext->buf[i] >> 8) & 0xFF);' $E ' mdContext->digest[ii+2] =' $E ' (unsigned char)((mdContext->buf[i] >> 16) & 0xFF);' $E ' mdContext->digest[ii+3] =' $E ' (unsigned char)((mdContext->buf[i] >> 24) & 0xFF);' $E ' }' $E '}' $E '/* Basic MD5 step. Transform buf based on in.' $E ' */' $E 'static void Transform (buf, in)' $E 'UINT4 *buf;' $E 'UINT4 *in;' $E '{' $E ' UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];' $E ' /* Round 1 */' $E '#define S11 7' $E '#define S12 12' $E '#define S13 17' $E '#define S14 22' $E ' FF ( a, b, c, d, in[ 0], S11, 3614090360); /* 1 */' $E ' FF ( d, a, b, c, in[ 1], S12, 3905402710); /* 2 */' $E ' FF ( c, d, a, b, in[ 2], S13, 606105819); /* 3 */' $E ' FF ( b, c, d, a, in[ 3], S14, 3250441966); /* 4 */' $E ' FF ( a, b, c, d, in[ 4], S11, 4118548399); /* 5 */' $E ' FF ( d, a, b, c, in[ 5], S12, 1200080426); /* 6 */' $E ' FF ( c, d, a, b, in[ 6], S13, 2821735955); /* 7 */' $E ' FF ( b, c, d, a, in[ 7], S14, 4249261313); /* 8 */' $E ' FF ( a, b, c, d, in[ 8], S11, 1770035416); /* 9 */' $E ' FF ( d, a, b, c, in[ 9], S12, 2336552879); /* 10 */' $E ' FF ( c, d, a, b, in[10], S13, 4294925233); /* 11 */' $E ' FF ( b, c, d, a, in[11], S14, 2304563134); /* 12 */' $E ' FF ( a, b, c, d, in[12], S11, 1804603682); /* 13 */' $E ' FF ( d, a, b, c, in[13], S12, 4254626195); /* 14 */' $E ' FF ( c, d, a, b, in[14], S13, 2792965006); /* 15 */' $E ' FF ( b, c, d, a, in[15], S14, 1236535329); /* 16 */' $E ' /* Round 2 */' $E '#define S21 5' $E '#define S22 9' $E '#define S23 14' $E '#define S24 20' $E ' GG ( a, b, c, d, in[ 1], S21, 4129170786); /* 17 */' $E ' GG ( d, a, b, c, in[ 6], S22, 3225465664); /* 18 */' $E ' GG ( c, d, a, b, in[11], S23, 643717713); /* 19 */' $E ' GG ( b, c, d, a, in[ 0], S24, 3921069994); /* 20 */' $E ' GG ( a, b, c, d, in[ 5], S21, 3593408605); /* 21 */' $E ' GG ( d, a, b, c, in[10], S22, 38016083); /* 22 */' $E ' GG ( c, d, a, b, in[15], S23, 3634488961); /* 23 */' $E ' GG ( b, c, d, a, in[ 4], S24, 3889429448); /* 24 */' $E ' GG ( a, b, c, d, in[ 9], S21, 568446438); /* 25 */' $E ' GG ( d, a, b, c, in[14], S22, 3275163606); /* 26 */' $E ' GG ( c, d, a, b, in[ 3], S23, 4107603335); /* 27 */' $E ' GG ( b, c, d, a, in[ 8], S24, 1163531501); /* 28 */' $E ' GG ( a, b, c, d, in[13], S21, 2850285829); /* 29 */' $E ' GG ( d, a, b, c, in[ 2], S22, 4243563512); /* 30 */' $E ' GG ( c, d, a, b, in[ 7], S23, 1735328473); /* 31 */' $E ' GG ( b, c, d, a, in[12], S24, 2368359562); /* 32 */' $E ' /* Round 3 */' $E '#define S31 4' $E '#define S32 11' $E '#define S33 16' $E '#define S34 23' $E ' HH ( a, b, c, d, in[ 5], S31, 4294588738); /* 33 */' $E ' HH ( d, a, b, c, in[ 8], S32, 2272392833); /* 34 */' $E ' HH ( c, d, a, b, in[11], S33, 1839030562); /* 35 */' $E ' HH ( b, c, d, a, in[14], S34, 4259657740); /* 36 */' $E ' HH ( a, b, c, d, in[ 1], S31, 2763975236); /* 37 */' $E ' HH ( d, a, b, c, in[ 4], S32, 1272893353); /* 38 */' $E ' HH ( c, d, a, b, in[ 7], S33, 4139469664); /* 39 */' $E ' HH ( b, c, d, a, in[10], S34, 3200236656); /* 40 */' $E ' HH ( a, b, c, d, in[13], S31, 681279174); /* 41 */' $E ' HH ( d, a, b, c, in[ 0], S32, 3936430074); /* 42 */' $E ' HH ( c, d, a, b, in[ 3], S33, 3572445317); /* 43 */' $E ' HH ( b, c, d, a, in[ 6], S34, 76029189); /* 44 */' $E ' HH ( a, b, c, d, in[ 9], S31, 3654602809); /* 45 */' $E ' HH ( d, a, b, c, in[12], S32, 3873151461); /* 46 */' $E ' HH ( c, d, a, b, in[15], S33, 530742520); /* 47 */' $E ' HH ( b, c, d, a, in[ 2], S34, 3299628645); /* 48 */' $E ' /* Round 4 */' $E '#define S41 6' $E '#define S42 10' $E '#define S43 15' $E '#define S44 21' $E ' II ( a, b, c, d, in[ 0], S41, 4096336452); /* 49 */' $E ' II ( d, a, b, c, in[ 7], S42, 1126891415); /* 50 */' $E ' II ( c, d, a, b, in[14], S43, 2878612391); /* 51 */' $E ' II ( b, c, d, a, in[ 5], S44, 4237533241); /* 52 */' $E ' II ( a, b, c, d, in[12], S41, 1700485571); /* 53 */' $E ' II ( d, a, b, c, in[ 3], S42, 2399980690); /* 54 */' $E ' II ( c, d, a, b, in[10], S43, 4293915773); /* 55 */' $E ' II ( b, c, d, a, in[ 1], S44, 2240044497); /* 56 */' $E ' II ( a, b, c, d, in[ 8], S41, 1873313359); /* 57 */' $E ' II ( d, a, b, c, in[15], S42, 4264355552); /* 58 */' $E ' II ( c, d, a, b, in[ 6], S43, 2734768916); /* 59 */' $E ' II ( b, c, d, a, in[13], S44, 1309151649); /* 60 */' $E ' II ( a, b, c, d, in[ 4], S41, 4149444226); /* 61 */' $E ' II ( d, a, b, c, in[11], S42, 3174756917); /* 62 */' $E ' II ( c, d, a, b, in[ 2], S43, 718787259); /* 63 */' $E ' II ( b, c, d, a, in[ 9], S44, 3951481745); /* 64 */' $E ' buf[0] += a;' $E ' buf[1] += b;' $E ' buf[2] += c;' $E ' buf[3] += d;' $E '}' $E '/*' $E ' **********************************************************************' $E ' ** End of md5.c **' $E ' ******************************* (cut) ********************************' $E ' */' $E '/*' $E ' **********************************************************************' $E ' ** md5driver.c -- sample routines to test **' $E ' ** RSA Data Security, Inc. MD5 message digest algorithm. **' $E ' ** Created: 2/16/90 RLR **' $E ' ** Updated: 1/91 SRD **' $E ' **********************************************************************' $E ' */' $E '/*' $E ' **********************************************************************' $E ' ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **' $E ' ** **' $E ' ** RSA Data Security, Inc. makes no representations concerning **' $E ' ** either the merchantability of this software or the suitability **' $E ' ** of this software for any particular purpose. It is provided "as **' $E ' ** is" without express or implied warranty of any kind. **' $E ' ** **' $E ' ** These notices must be retained in any copies of any part of this **' $E ' ** documentation and/or software. **' $E ' **********************************************************************' $E ' */' $E '#include ' $E '#include ' $E '#include ' $E '#include ' $E '/* -- include the following file if the file md5.h is separate -- */' $E '/* #include "md5.h" */' $E '/* Prints message digest buffer in mdContext as 32 hexadecimal digits.' $E ' Order is from low-order byte to high-order byte of digest.' $E ' Each byte is printed with high-order hexadecimal digit first.' $E ' */' $E 'static void MDPrint (mdContext)' $E 'MD5_CTX *mdContext;' $E '{' $E ' int i;' $E ' for (i = 0; i < 16; i++)' $E ' printf ("%02x", mdContext->digest[i]);' $E '}' $E '/* size of test block */' $E '#define TEST_BLOCK_SIZE 1000' $E '/* number of blocks to process */' $E '#define TEST_BLOCKS 10000' $E '/* number of test bytes = TEST_BLOCK_SIZE * TEST_BLOCKS */' $E 'static long TEST_BYTES = (long)TEST_BLOCK_SIZE * (long)TEST_BLOCKS;' $E '/* A time trial routine, to measure the speed of MD5.' $E ' Measures wall time required to digest TEST_BLOCKS * TEST_BLOCK_SIZE' $E ' characters.' $E ' */' $E 'static void MDTimeTrial ()' $E '{' $E ' MD5_CTX mdContext;' $E ' time_t endTime, startTime;' $E ' unsigned char data[TEST_BLOCK_SIZE];' $E ' unsigned int i;' $E ' /* initialize test data */' $E ' for (i = 0; i < TEST_BLOCK_SIZE; i++)' $E ' data[i] = (unsigned char)(i & 0xFF);' $E ' /* start timer */' $E ' printf ("MD5 time trial. Processing %ld characters...\n", TEST_BYTES);' $E ' time (&startTime);' $E ' /* digest data in TEST_BLOCK_SIZE byte blocks */' $E ' MD5Init (&mdContext);' $E ' for (i = TEST_BLOCKS; i > 0; i--)' $E ' MD5Update (&mdContext, data, TEST_BLOCK_SIZE);' $E ' MD5Final (&mdContext);' $E ' /* stop timer, get time difference */' $E ' time (&endTime);' $E ' MDPrint (&mdContext);' $E ' printf (" is digest of test input.\n");' $E ' printf' $E ' ("Seconds to process test input: %ld\n", (long)(endTime-startTime));' $E ' printf' $E ' ("Characters processed per second: %ld\n",' $E ' TEST_BYTES/(endTime-startTime));' $E '}' $E '/* Computes the message digest for string inString.' $E ' Prints out message digest, a space, the string (in quotes) and a' $E ' carriage return.' $E ' */' $E 'static void MDString (inString)' $E 'char *inString;' $E '{' $E ' MD5_CTX mdContext;' $E ' unsigned int len = strlen (inString);' $E ' MD5Init (&mdContext);' $E ' MD5Update (&mdContext, inString, len);' $E ' MD5Final (&mdContext);' $E ' MDPrint (&mdContext);' $E ' printf (" \"%s\"\n\n", inString);' $E '}' $E '/* Computes the message digest for a specified file.' $E ' Prints out message digest, a space, the file name, and a carriage' $E ' return.' $E ' */' $E 'static void MDFile (filename)' $E 'char *filename;' $E '{' $E ' FILE *inFile = fopen (filename, "rb");' $E ' MD5_CTX mdContext;' $E ' int bytes;' $E ' unsigned char data[1024];' $E ' if (inFile == NULL) {' $E ' printf ("%s can''t be opened.\n", filename);' $E ' return;' $E ' }' $E ' MD5Init (&mdContext);' $E ' while ((bytes = fread (data, 1, 1024, inFile)) != 0)' $E ' MD5Update (&mdContext, data, bytes);' $E ' MD5Final (&mdContext);' $E ' MDPrint (&mdContext);' $E ' printf (" %s\n", filename);' $E ' fclose (inFile);' $E '}' $E '/* Writes the message digest of the data from stdin onto stdout,' $E ' followed by a carriage return.' $E ' */' $E 'static void MDFilter ()' $E '{' $E ' MD5_CTX mdContext;' $E ' int bytes;' $E ' unsigned char data[16];' $E ' MD5Init (&mdContext);' $E ' while ((bytes = fread (data, 1, 16, stdin)) != 0)' $E ' MD5Update (&mdContext, data, bytes);' $E ' MD5Final (&mdContext);' $E ' MDPrint (&mdContext);' $E ' printf ("\n");' $E '}' $E '/* Runs a standard suite of test data.' $E ' */' $E 'static void MDTestSuite ()' $E '{' $E ' printf ("MD5 test suite results:\n\n");' $E ' MDString ("");' $E ' MDString ("a");' $E ' MDString ("abc");' $E ' MDString ("message digest");' $E ' MDString ("abcdefghijklmnopqrstuvwxyz");' $E ' MDString' $E ' ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");' $E ' MDString' $E ' ("1234567890123456789012345678901234567890\' $E '1234567890123456789012345678901234567890");' $E ' /* Contents of file foo are "abc" */' $E ' MDFile ("foo");' $E '}' $E 'void main (argc, argv)' $E 'int argc;' $E 'char *argv[];' $E '{' $E ' int i;' $E ' /* For each command line argument in turn:' $E ' ** filename -- prints message digest and name of file' $E ' ** -sstring -- prints message digest and contents of string' $E ' ** -t -- prints time trial statistics for 1M characters' $E ' ** -x -- execute a standard suite of test data' $E ' ** (no args) -- writes messages digest of stdin onto stdout' $E ' */' $E ' if (argc == 1)' $E ' MDFilter ();' $E ' else' $E ' for (i = 1; i < argc; i++)' $E ' if (argv[i][0] == '"'"'-'"'"' && argv[i][1] == '"'"'s'"'"')' $E ' MDString (argv[i] + 2);' $E ' else if (strcmp (argv[i], "-t") == 0)' $E ' MDTimeTrial ();' $E ' else if (strcmp (argv[i], "-x") == 0)' $E ' MDTestSuite ();' $E ' else MDFile (argv[i]);' $E '}' $E '/*' $E ' **********************************************************************' $E ' ** End of md5driver.c **' $E ' ******************************* (cut) ********************************' $E ' */' RsyncErrorsMonday: Makefile wiki/RsyncErrorsMonday RsyncLogMonday: Makefile wiki/RsyncLogMonday RsyncSummaryMonday: Makefile wiki/RsyncSummaryMonday wiki/RsyncErrorsMonday: $(RsyncLogs)/Monday wiki/RsyncLogMonday: $(RsyncLogs)/Monday wiki/RsyncSummaryMonday: $(RsyncLogs)/Monday -$(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start cat $? $(prime) $(CutLongLines) $(pump) awk ' \ /^200/ {n=split($$2,a,"/");printf "\n%s\t%s",$$1,a[n]} \ /files transferred:/ {printf "\t%s",$$NF} \ /transferred file size/ {printf "\t%s",$$(NF-1)} \ /real.*user.*sys/ {printf "\t%.2f\t%.2f\t%.2f\t%.2f\t",$$1,$$3,$$5,$$1-$$3-$$5} \ /\/RsyncLoop,v/ {printf "%s\tVersion %s\nwhen\tuser \tfiles \tbytes \tseconds \tuser \tsys \tiowait \t\n-\t-\t-\t-\t-\t-\t-\t-\t",$$1,$$2} \ ' $(pump) BetterComma $(pump) $(NoThreeCommas) $(pump) # they were in date stamps $(EndPumpingAndMoveThem) $(SixOhSixIt) $(AddIdTag) #$(MoreThem) $(CleanUp) RsyncErrorsTuesday: Makefile wiki/RsyncErrorsTuesday RsyncLogTuesday: Makefile wiki/RsyncLogTuesday RsyncSummaryTuesday: Makefile wiki/RsyncSummaryTuesday wiki/RsyncErrorsTuesday: $(RsyncLogs)/Tuesday wiki/RsyncLogTuesday: $(RsyncLogs)/Tuesday wiki/RsyncSummaryTuesday: $(RsyncLogs)/Tuesday -$(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start cat $? $(prime) $(CutLongLines) $(pump) awk ' \ /^200/ {n=split($$2,a,"/");printf "\n%s\t%s",$$1,a[n]} \ /files transferred:/ {printf "\t%s",$$NF} \ /transferred file size/ {printf "\t%s",$$(NF-1)} \ /real.*user.*sys/ {printf "\t%.2f\t%.2f\t%.2f\t%.2f\t",$$1,$$3,$$5,$$1-$$3-$$5} \ /\/RsyncLoop,v/ {printf "%s\tVersion %s\nwhen\tuser \tfiles \tbytes \tseconds \tuser \tsys \tiowait \t\n-\t-\t-\t-\t-\t-\t-\t-\t",$$1,$$2} \ ' $(pump) BetterComma $(pump) $(NoThreeCommas) $(pump) # they were in date stamps $(EndPumpingAndMoveThem) $(SixOhSixIt) $(AddIdTag) #$(MoreThem) $(CleanUp) RsyncErrorsWednesday: Makefile wiki/RsyncErrorsWednesday RsyncLogWednesday: Makefile wiki/RsyncLogWednesday RsyncSummaryWednesday: Makefile wiki/RsyncSummaryWednesday wiki/RsyncErrorsWednesday: $(RsyncLogs)/Wednesday wiki/RsyncLogWednesday: $(RsyncLogs)/Wednesday wiki/RsyncSummaryWednesday: $(RsyncLogs)/Wednesday -$(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start cat $? $(prime) $(CutLongLines) $(pump) awk ' \ /^200/ {n=split($$2,a,"/");printf "\n%s\t%s",$$1,a[n]} \ /files transferred:/ {printf "\t%s",$$NF} \ /transferred file size/ {printf "\t%s",$$(NF-1)} \ /real.*user.*sys/ {printf "\t%.2f\t%.2f\t%.2f\t%.2f\t",$$1,$$3,$$5,$$1-$$3-$$5} \ /\/RsyncLoop,v/ {printf "%s\tVersion %s\nwhen\tuser \tfiles \tbytes \tseconds \tuser \tsys \tiowait \t\n-\t-\t-\t-\t-\t-\t-\t-\t",$$1,$$2} \ ' $(pump) BetterComma $(pump) $(NoThreeCommas) $(pump) # they were in date stamps $(EndPumpingAndMoveThem) $(SixOhSixIt) $(AddIdTag) #$(MoreThem) $(CleanUp) RsyncErrorsThursday: Makefile wiki/RsyncErrorsThursday RsyncLogThursday: Makefile wiki/RsyncLogThursday RsyncSummaryThursday: Makefile wiki/RsyncSummaryThursday wiki/RsyncErrorsThursday: $(RsyncLogs)/Thursday wiki/RsyncLogThursday: $(RsyncLogs)/Thursday wiki/RsyncSummaryThursday: $(RsyncLogs)/Thursday -$(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start cat $? $(prime) $(CutLongLines) $(pump) awk ' \ /^200/ {n=split($$2,a,"/");printf "\n%s\t%s",$$1,a[n]} \ /files transferred:/ {printf "\t%s",$$NF} \ /transferred file size/ {printf "\t%s",$$(NF-1)} \ /real.*user.*sys/ {printf "\t%.2f\t%.2f\t%.2f\t%.2f\t",$$1,$$3,$$5,$$1-$$3-$$5} \ /\/RsyncLoop,v/ {printf "%s\tVersion %s\nwhen\tuser \tfiles \tbytes \tseconds \tuser \tsys \tiowait \t\n-\t-\t-\t-\t-\t-\t-\t-\t",$$1,$$2} \ ' $(pump) BetterComma $(pump) $(NoThreeCommas) $(pump) # they were in date stamps $(EndPumpingAndMoveThem) $(SixOhSixIt) $(AddIdTag) #$(MoreThem) $(CleanUp) RsyncErrorsFriday: Makefile wiki/RsyncErrorsFriday RsyncLogFriday: Makefile wiki/RsyncLogFriday RsyncSummaryFriday: Makefile wiki/RsyncSummaryFriday wiki/RsyncErrorsFriday: $(RsyncLogs)/Friday wiki/RsyncLogFriday: $(RsyncLogs)/Friday wiki/RsyncSummaryFriday: $(RsyncLogs)/Friday -$(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start cat $? $(prime) $(CutLongLines) $(pump) awk ' \ /^200/ {n=split($$2,a,"/");printf "\n%s\t%s",$$1,a[n]} \ /files transferred:/ {printf "\t%s",$$NF} \ /transferred file size/ {printf "\t%s",$$(NF-1)} \ /real.*user.*sys/ {printf "\t%.2f\t%.2f\t%.2f\t%.2f\t",$$1,$$3,$$5,$$1-$$3-$$5} \ /\/RsyncLoop,v/ {printf "%s\tVersion %s\nwhen\tuser \tfiles \tbytes \tseconds \tuser \tsys \tiowait \t\n-\t-\t-\t-\t-\t-\t-\t-\t",$$1,$$2} \ ' $(pump) BetterComma $(pump) $(NoThreeCommas) $(pump) # they were in date stamps $(EndPumpingAndMoveThem) $(SixOhSixIt) $(AddIdTag) #$(MoreThem) $(CleanUp) RsyncErrorsSaturday: Makefile wiki/RsyncErrorsSaturday RsyncLogSaturday: Makefile wiki/RsyncLogSaturday RsyncSummarySaturday: Makefile wiki/RsyncSummarySaturday wiki/RsyncErrorsSaturday: $(RsyncLogs)/Saturday wiki/RsyncLogSaturday: $(RsyncLogs)/Saturday wiki/RsyncSummarySaturday: $(RsyncLogs)/Saturday -$(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start cat $? $(prime) $(CutLongLines) $(pump) awk ' \ /^200/ {n=split($$2,a,"/");printf "\n%s\t%s",$$1,a[n]} \ /files transferred:/ {printf "\t%s",$$NF} \ /transferred file size/ {printf "\t%s",$$(NF-1)} \ /real.*user.*sys/ {printf "\t%.2f\t%.2f\t%.2f\t%.2f\t",$$1,$$3,$$5,$$1-$$3-$$5} \ /\/RsyncLoop,v/ {printf "%s\tVersion %s\nwhen\tuser \tfiles \tbytes \tseconds \tuser \tsys \tiowait \t\n-\t-\t-\t-\t-\t-\t-\t-\t",$$1,$$2} \ ' $(pump) BetterComma $(pump) $(NoThreeCommas) $(pump) # they were in date stamps $(EndPumpingAndMoveThem) $(SixOhSixIt) $(AddIdTag) #$(MoreThem) $(CleanUp) RsyncErrorsSunday: Makefile wiki/RsyncErrorsSunday RsyncLogSunday: Makefile wiki/RsyncLogSunday RsyncSummarySunday: Makefile wiki/RsyncSummarySunday wiki/RsyncErrorsSunday: $(RsyncLogs)/Sunday wiki/RsyncLogSunday: $(RsyncLogs)/Sunday wiki/RsyncSummarySunday: $(RsyncLogs)/Sunday -$(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start cat $? $(prime) $(CutLongLines) $(pump) awk ' \ /^200/ {n=split($$2,a,"/");printf "\n%s\t%s",$$1,a[n]} \ /files transferred:/ {printf "\t%s",$$NF} \ /transferred file size/ {printf "\t%s",$$(NF-1)} \ /real.*user.*sys/ {printf "\t%.2f\t%.2f\t%.2f\t%.2f\t",$$1,$$3,$$5,$$1-$$3-$$5} \ /\/RsyncLoop,v/ {printf "%s\tVersion %s\nwhen\tuser \tfiles \tbytes \tseconds \tuser \tsys \tiowait \t\n-\t-\t-\t-\t-\t-\t-\t-\t",$$1,$$2} \ ' $(pump) BetterComma $(pump) $(NoThreeCommas) $(pump) # they were in date stamps $(EndPumpingAndMoveThem) $(SixOhSixIt) $(AddIdTag) #$(MoreThem) $(CleanUp) $(PLAN9)/src: PlanNinePort AppleDtd=http://www.apple.com/DTDs/PropertyList-1.0.dtd AppleDtd: wiki/AppleDtd Tmp/AppleDtd Tmp/AppleDtd: ;$(WgetIt) $(AppleDtd) wiki/AppleDtd: Tmp/AppleDtd GoogleLabels GoogleLables: $(NoEcho) $(WhatEcho) 'Paste here, followed by ^D ' cat - |\ awk 'NF==1{last=$$1};$$4~/^remove$$/{print last,$$1}' |\ sed -e 's/(//' |\ qdt $@ Labels' 'and conversation counts $(Echo) $(AddIdTag) /net/Groups/sysadmin/Scripts/Info/RsyncLogs/Tuesday: BurnIt=hdiutil burn $? HelixForensics=http://mirror.cc.vt.edu/pub/projects/helix/Helix_V1.9-07-13a-2007.iso HelixForensics: Tmp/HelixForensics.iso ;$(BurnIt) Tmp/HelixForensics.iso: MinuteMark ;$(CurlIt) $(HelixForensics) X11Settings=com.apple.x11 FocusFollows WindowsFocus FollowsMouse: /usr/bin/defaults ;$? write $(X11Settings) wm_ffm -bool true && echo Now quit and restart X11 /usr/bin/defaults: MacOsxOnly PlanNineIso=http://plan9.bell-labs.com/plan9/download/plan9.iso.bz2 PlanNineIso: PlanNineIso.iso ;$(BurnIt) PlanNineIso.iso: PlanNineIso.iso.bz2 ;bunzip2 $? PlanNineIso.iso.bz2: TcpTuning MinuteMark Desktop ;$(WgetIt) $(PlanNineIso) || $(CurlIt) $(PlanNineIso) CronTabs/A: $E '# $$Header: /user/garrod/RCS/Makefile,v 6.81 2008-04-29 17:02:12-07 garrod Exp garrod $$ ' $E '# $$Ckg: $$Header: /user/garrod/RCS/Makefile,v 6.81 2008-04-29 17:02:12-07 garrod Exp garrod $$ $$ ' $E '# m hr da mo wkd command to execute % is special like' $E '#-- -- -- -- --- -' $E '# 00 00 01 01 * echo $$Id: Makefile,v 6.81 2008-04-29 17:02:12-07 garrod Exp garrod $$ ' $E '# 00 00 01 01 * echo caveat editor: wkd is one of Sun 0 Mon 1 ... Fri 5 Sat 6' $E '# yyp!! date +"\%M \%H \%d \%m \%w " -d '"'"'2 minutes'"'"' /usr/bin/calendar' $(CiQl) $@ PlanNineDf: $E '#!/bin/rc' $E '' $E 'rfork e' $E '' $E 'fn h2d {' $E ' echo '"'"'ibase=16;'"'"' print `{echo $$1|tr a-z A-Z} |bc' $E '' $E '}' $E '' $E 'fn swap {' $E ' echo $$1 | sed '"'"'s/(..)(..)(..)(..)/\4\3\2\1/'"'"'' $E '' $E '}' $E '' $E 'fn df {' $E ' echo -n $$1 '"'"''"'"'' $E ' blksz=`{xd -c $$1 |grep 110 |sed 1q |' $E ' sed '"'"'s/^....... (.) (.) (.) (.).*/\1\2\3\4/'"'"'}' $E ' info=`{dd -bs $$blksz -iseek 1 -count 1 < $1 >[2]/dev/null | xd -l | sed 1q}' $E ' total=$$info(3)' $E ' free=$$info(4)' $E ' if(~ $$cputype 386) {' $E ' total=`{swap $$total}' $E ' free=`{swap $$free}' $E ' }' $E ' total=`{h2d $$total}' $E ' free=`{h2d $$free}' $E '' $E ' totalb=`{hoc -e $$total^'"'"'*'"'"'^$$blksz}' $E ' freeb=`{hoc -e $$free^'"'"'*'"'"'^$$blksz}' $E ' echo $$free / $$total '"'"'*'"'"' $$blksz '"'"'='"'"' $$freeb / $$totalb' $E '' $E '}' $E '' $E 'disk=`{ls /dev/sd??/fs}' $E 'if(~ $$#disk 0) {' $E ' echo no disk found' $E ' exit '"'"'no disk'"'"'' $E '' $E '}' $E '' $E 'for(i in $$disk)' $E ' df $$i ' $E '' chmod a+x $@ #~ fix this: make.5.10: *** No rule to make target `+"%A"`', needed by `wiki/RsyncErrorsWednesday'. PingableList=nerd geek humu igpphome SivsLaelia ObsMez BajaMonkey SelectOne: ; for i in $(PingableList);do if ping -c 2 $$i;then echo $@ $$i then;else echo $@ $$i else;fi;done TodaysMuddle: cat $$W/TodaysPage|WikiWords DepartmentScreenScrape: Dat/DepartmentScreenScrape Tmp/DepartmentScreenScrape: Makefile @echo Go log into https://alen.ucsd.edu/alen/ @echo AdvancedSearch for Department IGPP @echo Hit y and return when ready to paste it into vi /bin/rm -i $@ vi -c ":set noshowmatch matchtime=0" $@ Dat/DepartmentScreenScrape: Tmp/DepartmentScreenScrape -$(CleanUq) $(MakeOut) $(StartPumping) grep ' .* ' $(pump) gnot Password: $(pump) awk 'BEGIN{ FS=OFS=" "};$$1!~/^$$/{last=$$0};$$1~/^$$/{print last,$$0}' $(pump) # like JoinIndenNoColon headline mailname fullname affiliation department aliases blank vpn dialin comments created updated $(pump) awk 'BEGIN{ FS=OFS=" "};$(MM/DD/YY);$$10+1>1{$$10=rewrite($$10);$$11=rewrite($$11)};{print $$0}' $(pump) sorttbl $(pump) $(EndPumping) $(CheckOut) $(MoveThem) -$(ShowDiffs) $(CheckIn) $(CleanUp) MM/DD/YY=function rewrite(x){split(x,a,"/");return((a[3]>69?"19":"20")a[3]a[1]a[2])} RsyncPath=--rsync-path=/igpp/bin/rsync SolariumTemperature: wiki/SolariumTemperature #~ Wikify the VoiceMails from TheSolarium wiki/SolariumTemperature: UnderConstruction ;while read x y;do qd SolariumTemperature $$x $$y;done PrinterList=`ls -tl /net/lplog/*.log| sed -e 's;.*/;;' -e 's;\.log;;'` PrinterList=`lpc stat|grep :|colontab` UnixPrinting: igpntwk sudo ;sudo lpc start $(PrinterList);sudo lpc enable $(PrinterList); PrinterWatch: igpntwk for i in $(PrinterList);do tail -f /net/lplog/$$i.log & done $(MakeIt) TestPrints TestPrints: /net/lplog/. ;TestPrint $(PrinterList) & PrinterQueues: ;for i in $(PrinterList);do dt $$i `lpq -P $$i`;done PierReview=114 SB PierReview http://toastmasters.ucsd.edu CalendarAhead: /igpp/bin/date #~ I did this on a tuesday for PierReview into a file and then sh that file for i in $(Digits) ;\ do for j in $(Digits) ;\ do $? -d "+$$i$$j week" "+calendar %m/%d.12 %Y $(PierReview)" ;\ done ;\ done yp: sudo geek ;$(sudo) $(MAKE) $(MFLAGS) -C /var/yp NetComDat=/net/com/dat auto.net: $(NetComDat)/auto.net WayBackMachine=http://web.archive.org/web/*/http://cm.bell-labs.com/wiki/plan9/news/ PlanNineWikiNews=http://cm.bell-labs.com/wiki/plan9/news/ WayBackGetIt=$(WgetIt) $(WayBackMachine)/*/ Tmp/PlanNineWikiNews: ;$(WayBackGetIt) $(PlanNineWikiNews) PlanNineWikiNews: Tmp/PlanNineWikiNews ;cat $?|DateStamp|end|sort -u|qdt $@ WeekDay=Sunday Monday Tuesday Wednesday Thursday Friday Saturday RsyncMaxes: ;for i in $(WeekDay);do test `grep -n "^when" wiki/RsyncSummary$$i|wc -l` -gt 1 || $(MakeIt) RsyncMax WeekDay=$$i;done RsyncMax: wiki/RsyncSummary$(WeekDay) #~ RsyncMaxes tests to see if it has already been done -$(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start $(StartPumping) # just cats prereq's or command $(prime) or $(pr1me) grep ' ' $(pump) gnot RsyncLoop $(pump) sqz $(pump) rename user User $(pump) rename user usertime $(pump) uncomma $(pump) maxes $(pump) comma $(pump) Column files bytes seconds usertime sys iowait $(pump) $(EndPumping) greplist<$? `cat Tmp/$@` |gnot Rsync >>$? MyVim: locate vim.vim cd /usr/share/vim/vim62 sudo chown -R ckg /usr/share/vim mv vimrc vim62 for i in $y;do ln -s vim62/$i $i;done ci -q -l -t-FirstEditionVim62 -m"MyVim" vim62/* vim62/*/* vim62/*/*/* FortranExamples=http://www.kcl.ac.uk/kis/support/cit//fortran/f2003_book_examples/f2003_examples.tar FortranExamples: FortranExamples.tar forpr/FortranExamples ;(cd forpr/$@&&tar -xvf ../../$@.tar ) FortranExamples.tar: Desktop ;$(WgetIt) $(FortranExamples) || $(CurlIt) $(FortranExamples) forpr/FortranExamples: ;$(MakeDirWithoutSudoIfNeeded) # 20080402 getting better 20061218 consolidating here from my little bin Bin/index.html: Dat/binlist Dat/blnlist Dat/binList: bin UnderConstruction ;$(CheckOut) && ls bin >$@ && $(CheckIn) Dat/binlist: ;dir $B | gnot ^[dl] Makefile|table #~ show me what works are in progress binList: Dat/binList index: Bin/index.html # HistoryPaster: Needs a tab on the end :.,$s/^ [0-9]* */ blnList: UnderConstruction Dat/blnList Dat/blnList: bln #~ SymLinks listed to build WebPages $(MakeOut) ls -l $? $(prime) awk '$$10!=""{print $$10" "$$8}' $(pump) grep '^\.\./bin/' $(pump) sed -e 's;^\.\./bin/;;' $(pump) headline source link $(pump) sorttbl $(pump) $(EndPumping) $(CheckOut) $(MoveThem) -$(ShowDiffs) | rsr $(CheckIn) $(CleanUp) MakeFileCheck: Makefile cat $?|grep -v '^$$'|grep -v '^[.%$$ #/0-9a-zA-Z].*$$'|uniq -c UndefinedWords: HasbroDictionary sysctl=/usr/sbin/sysctl sysctl: $(sysctl) Dat ;$(sysctl) -a >Dat/$(HostName)~$@ BrandonEnright=http://no-cleanup.ucsd.edu/public_cd_images/The_Forensic_Resource_Kit.iso BrandonEnright: Tmp/BrandonEnright.iso ;$(BurnIt) Tmp/BrandonEnright.iso: MinuteMark ;$(CurlIt) $(BrandonEnright) ThisTty=psgrep $@|Column tt|headoff|sort -u ThisTty: ;$(ThisTty) KillMinuteMark: ;psgrep `$(ThisTty)`.*sleep.60|killthem CronDate crondate crontime: ;($(CronTime) -d '2 minutes' || $(CronTime)) MyDotMacFind: Dat/MyDotMacFind Dat/MyDotMacFind: /Volumes/ministerofnetworks ;find $? -ls|$(SshHomeBase) "findrdb>$@;$(CiQlFaL) $@" OpenSummaries: ;cd wiki&&for i in RsyncSummar*day;do open http://humu.ucsd.edu/cgi-bin/ChrisGarrod?$$i#bottom&done MacSlash: /Network ;$(MacSlash) #~ if it fails, this is not a mac MacSlash=9 ls / |\ grep -v ' ' |\ grep -v /Network |\ grep -v /Volumes |\ grep -v /dev |\ grep -v /cores |\ grep -v Private.Data |\ cat ScrabbleChallengeWords: wiki/ScrabbleChallengeWords SevenCommas: #~ These are taking way too long cat $W/RsyncSumm*day $W/RCS/RsyncSumm*day,v |\ grep '^'`date +%Y`'.*,.*,.*,.*,.*,.*,.*,.*$$' |\ sort -u |\ headline when who files bytes seconds user sys iowait WhosAtLoneStar: Dat/WhosAtLoneStar #~ some names are too long for onhead to do the right thing. Dat/WhosAtLoneStar: TmpDat .force #~ DoNotPublishThisInformation bookerman, giantguard $(MakeOut) ssh garrod@sdf.lonestar.org finger $(prime) awk 'length($$1)<9' $(pump) onhead $(pump) rename 'Office Phone' Phone $(pump) Column Login Name Office Phone $(pump) cat $@ - $(pump) sorttbl -u $(pump) $(EndPumpingAndMoveThem) -$(ShowDiffs) $(CheqInOutAndCleanUp) ScrabbleChallenge: #~ Automate everything I can ScrabbleChallenge: Nset #~ this was made into a looping script and UseFunctions @echo "alias s='sort +2n $(MyWikiFiles)/'$N" #~ AutomateEverything @echo "alias t='tail $(MyWikiFiles)/'$(today)" @echo "alias b='dt>>$(MyWikiFiles)/'$N" @echo "alias 2='cat $(MyWikiFiles)/TwoLette*|gnot list|greplist'" @echo "alias 3='cat $(MyWikiFiles)/ThreeLet*|gnot list|greplist'" @echo "alias j='cat $(MyWikiFiles)/WordsWithJ*|gnot list|greplist'" @echo "function www() { s|$B/3tab2|sort -n|headline score word|onemany |1sp ; }" dt $N >> $(MyWikiFiles)/ScrabbleChallenge PathInodes: wiki/PathInodes wiki/PathInodes: ;for i in $$PathList;do ls -id $$i 2>/dev/null ;done > $@$(HostName) MySql=/usr/bin/mysql NewSupport: $(MySql) $(Nset) $(MySql) --socket=/tmp/mysql.sock -uroot --password=$N -e"use support3101_development; SELECT * FROM hosts" >$@ # NewSupport has these columns: # id host location user1 user2 serial_number level device owner start comment lab_machine office_admin_machine nsf server lock_version # OldSupport has these: # host room user level device owner start support_comment NewerSupport: NewSupport -$(CleanUq) # quietly cleanup to start remove when debugged $(MakeOut) # get ready to start $(StartPumping) # just cats prereq's or command $(prime) or $(pr1me) insertdash $(pump) rename location room $(pump) rename user1 user $(pump) rename user2 u2 $(pump) rename comment support_comment $(pump) rename lab_machine l $(pump) rename office_admin_machine o $(pump) rename nsf n $(pump) rename server s $(pump) rename lock_version v $(pump) Column host room user level device owner start support_comment id u2 l o n s v serial_number $(pump) $(EndPumping) $(MoveThem) # change to MoveThem when looking good, nearly done SendSupport: NewerSupport cat $?|$(SshHomeBase) 'co -l /net/dbs/support&&cat - > /net/dbs/support' /bin/rm New*Support TokenWord: UnderConstruction wiki/TokenWord wiki/TokenWord: UnderConstruction @echo open http://www.hyperworlds.org/cgi-bin/tw/tokenWord.pl @psswrd TokenWord @echo Log in and cut/paste that screen $(MakeOut) $(NoEcho) && cat - $(prime) && $(NowEcho) awk '/token.balance:/{print;getline;print}' $(pump) dt $(pump) $(EndPumpingAndMoreThem) test ! -t 1||$(ShowDiff)|grep -v '$$Id'|grep -v 'Your message stats'|table # 20080122 do I have to do this? $(LockIn) $(SixOhSixIt)