Skip to content

Instantly share code, notes, and snippets.

@awreece
Created July 29, 2013 04:05
Show Gist options
  • Save awreece/6102091 to your computer and use it in GitHub Desktop.
Save awreece/6102091 to your computer and use it in GitHub Desktop.
file=word.lst
sed -e ":s s/\([a]\)\(b\)/\2\1/g;s/\([a-b]\)\(c\)/\2\1/g;s/\([a-c]\)\(d\)/\2\1/g;s/\([a-d]\)\(e\)/\2\1/g;s/\([a-e]\)\(f\)/\2\1/g;s/\([a-f]\)\(g\)/\2\1/g;s/\([a-g]\)\(h\)/\2\1/g;s/\([a-h]\)\(i\)/\2\1/g;s/\([a-i]\)\(j\)/\2\1/g;s/\([a-j]\)\(k\)/\2\1/g;s/\([a-k]\)\(l\)/\2\1/g;s/\([a-l]\)\(m\)/\2\1/g;s/\([a-m]\)\(n\)/\2\1/g;s/\([a-n]\)\(o\)/\2\1/g;s/\([a-o]\)\(p\)/\2\1/g;s/\([a-p]\)\(q\)/\2\1/g;s/\([a-q]\)\(r\)/\2\1/g;s/\([a-r]\)\(s\)/\2\1/g;s/\([a-s]\)\(t\)/\2\1/g;s/\([a-t]\)\(u\)/\2\1/g;s/\([a-u]\)\(v\)/\2\1/g;s/\([a-v]\)\(w\)/\2\1/g;s/\([a-w]\)\(x\)/\2\1/g;s/\([a-x]\)\(y\)/\2\1/g;s/\([a-y]\)\(z\)/\2\1/g;t s;" < $file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment