Do you ever want to take some lines from the middle of a file say, lines 300-400? You can do that in a kludgey way with Unix head and tail: cat ids.csv | head -400 | tail -100 The take command from vbin tools does just that. cat ids.csv |take 300 400 Here we…
The Model-View-Controller Pattern ( MVC ) is not the only game in town. In fact it is awkward and cumbersome in some cases. MVC is a D esign Pattern , and Design Patterns show us how to solve common problems with common solutions. However we should not just…
What should we call it? Call it whatever you like. I hear that a lot. As coders and builders of systems, we should take the time needed to come up with the best names for the systems , databases , tables , columns , filenames , modules , classes , methods …
A stitch in time saves nine, is a fundamental principals we should use to write code and build systems. It might be said, a stitch in time saves you from being stuck forever with unruly software. People just want to get the job done. But any small mistake or…
CSV files can be used on the Unix command line like database tables. grep can act as a where-clause, and awk can be used as column selector. However the csv utility from vbin makes it easier. Here it is. $csv -p books.csv id, isbn, name, publicated, type 1…
That's wizardry for you. How many times have you typed grep '^$' ? Do you grep ? grep, the Unix command that searches files for patterns, is one of the most useful Unix utilities. This example here grep '^$' passes a regular expression with two characters: a…
So often I hear tech folks talking about some implementation as being better than another because "It is more efficient ". Efficient? Efficient for who? The computer? Are we shaving milliseconds off processing time? That's ridiculous. We should be in the…
$What is $easier to $read? {A $document of $commands in a $pseudo $English $language $strewed with ($dollar $sign $symbols ($$), $French $Braces ({), and $semi-colons)? Or a $document $without all $that?} What is easier to read? A document of commands in a…
vbin has a very useful command called sav . You always need to make a backup copy of a file before messing with it. A simple $ cp book.xml -p book.xml.sav will do. The -p preserves the original date and ownership of the file. sav does this for you. In other…
vbin is a collection of very useful Unix Bash utilities. Available on github: https://github.com/dlink/vbin It is easy to install - See instructions in the README