Posts Tagged ‘ search ’

How to find incremental numbers in a file and increase them by a certain amount with perl and SED

Mar 7th, 2014 | By

So let’s say you have a file and in it is ton of field ID’s, something like this  <field id=”68″ size=”medium” type=”checkbox”> What you want to do is take the first 68 of these fields as well as all of their code and then append these new 68 fields and all of their code onto
[continue reading…]



Database wide search and replace script

Aug 21st, 2012 | By

Just something I thought that I would post as I needed a quick solution to do a search and replace of an entire Mysql Database.  It’s actually dumping the DB, searching and replacing the dump file and then re-importing it.  But it does the trick   #!/bin/bash if (($# >= 1)) ; then if (($#
[continue reading…]



Searching through your terminal buffer/history

Jan 16th, 2012 | By

For some reason I could have sworn this was as easy as pressing Ctrl-F but apparently it’s not.. Or maybe that’s something that was lost in the switch from Ubutntu to Debian.. Either way I needed a way to search a vast amount of terminal output quickly and easily and this is how I did
[continue reading…]