Debugging shell scripts comes handy, especially when unexpected things happen. Trust me, they do. I use two different approaches, based on what’s needed: debug while running it or when ran in the background, maybe by […]
Category: Programming
Capture IP From PING
This is just a simple sed to capture IP address from ping. Note host must allow ICMP. This was tested on sh, bash and zsh. An example:
DNS Blacklist on WRT
Recently I found a forum entry with a script for blocking ad’s via DNS for WRT (or any other OS using sh and dnsmasq). However it was missing two features: a white list and a […]
Easy bond Interface
If you ever set up a bond interface on Linux you know it takes a few file editing. I got tired of doing this, please find my script below creating a bond interface. This is […]
Classic Programmer Paintings
Great webpage, inspired by painting and technology http://classicprogrammerpaintings.com/
while loop in csh
This made my day, while loop in one line -one liner- under csh printf “while ( 1 ) \n df -m \n echo ‘remaining space’ \n sleep 60 \n end” | csh -f Of course, you could […]
RegexOne
If you have dealt with regular expression then you know that it takes a while to get a good grasp on it. If you are just learning it here is an amazing tutorial: http://regexone.com. Enjoy 😉
recipe
Sharing recipe is like open source software, or open source software is like sharing recipe?
compare “n” number of variables
An easy way to compare “n” number of variables in bash, precisely to find if all of them are equal or not, can be easily done in the following way: while [ $i -lt 10 […]
Interest Calculator
Recently I found myself calculating interest and interest duration, I heaven’t found any decent tool for this so I did one by myself in C++. It does nothing else but prints the numbers you were […]