How To Set The Window/XTerm Title
I find it useful to set the window title of my terminals for long running processes so I can see at a glace what is happening in the window or where in the process running in that window is at. In...
View ArticleProcess A File Line By Line In A Script
There are multiple ways to skin this cat. For now one of the simplest. #!/bin/sh while read LINE do ...DO SOME STUFF WITH THE ${LINE}... done <somefile.txt Replace “somefile.txt” with the file you...
View ArticleAdd A Comma To The End Of A Line
I work with long lists and WinSQL a lot. I always find myself wishing these long lists had commas at the end for pasting into a SQL where clause using “IN” for the list. This can be accomplished in...
View ArticleMagic Keys
Just wanted to save this off finally. Not that having it here will help me if I am locked up but… If you enabled Magic SysRq (CONFIG_MAGIC_SYSRQ=y, found in make menuconfig at Kernel hacking ->...
View ArticleServing Files Simply With Python
I had found this code for serving up a directory with a simple python command. python -m SimpleHTTPServer 9914 The above command will start a simple HTTP server on port 9914 serving files out of the...
View ArticleSimple Vim Macros
I found myself editing a configuration file (multiple actually) at work today and ran into an issue. The config file looked similar to: Var_1=A Var_2=B Var_3=C ... Var_146=ABC Var_147=ABD As it...
View ArticleMove LVM2 VG From Old Drive To A Drive On A New Machine
My old computer recently died. It was old enough that I didn’t spend a lot of time trying to fix it. I took the opportunity to get a new one. I have my drives set up so that my “home” partitions are...
View ArticleWhen grep and sed are not enough…
I found an article over at Linux Journal that lead with the sentence: When grep and sed aren’t enough, gawk may provide the extra horsepower that you need. I would have to argue against that. Nothing...
View ArticleDealing With Recursiveless Grep
If you work at all in Solaris (and maybe just older versions I don’t know) you will eventually find out that the version of “grep” shipped with the OS is missing the “-r” option for doing recursive...
View ArticleRecovering A File Deleted With “rm”
It happens, you accidentally delete a file and you need it back. Maybe you don’t do backups (shame on you). Maybe your most current backup isn’t good enough. Whatever the reason many people, myself...
View Article