Skip to content

Instantly share code, notes, and snippets.

@soveran
Created July 24, 2013 00:59
Show Gist options
  • Save soveran/6067374 to your computer and use it in GitHub Desktop.
Save soveran/6067374 to your computer and use it in GitHub Desktop.
Plain shell version of textorama, contributed by @djanowski
#!/bin/sh
hi=$(expr $(tput lines) - 1)
cp $1 $1.ts
ed -s $1.ts <<-EOS
1i
.pl ${hi}v
.
g/^---\$/s//.bp\\
.sp 2\\
.ce
wq
EOS
nroff $1.ts | less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment