Category: Uncategorized

  • Quick ascii table in hex.

    The Linux Quick Hacks page inspired on this one: perl -e ‘foreach $x (32..126) { printf(“:: %c %x ::”, $x, $x) } print “n”‘ Output::: 20 :::: ! 21 :::: ” 22 :::: # 23 :::: $ 24 :::: % 25 :::: & 26 :::: ‘ 27 :::: ( 28 :::: ) 29 :::: *…

  • sed guides.

    I’m using sed (along with awk and shell scripts) to extract data from my website files. Frequently Asked Questions about sed, the stream editor sed one-liners Colorized list_urls.sed

  • sed/sh/awk removing a section in multiple files

    All of my scripts are in ~/bin, I’m replacing a marked section with my google adsense code, contained in a separate file. remove_topstart.sh:#!/bin/shfind . -name ‘*.html’ | while read xdo   cat $x | awk -f ~/bin/remove_topstart.awk >> $x.$$   cp $x.$ $x   rm $x.$done remove_topstart.awk:BEGIN { outsideTop = 1 }/<!–TOPSTART–>/ { outsideTop = 0 }/<!–TOPEND–>/ { outsideTop = 1…