Wednesday, September 30, 2015

Another ways of reading #AmazingFact

Another ways of reading #AmazingFact @amazingfacts on unix like operating system

Installed elinks text browser, you can install it on ubuntu for example with
sudo apt-get install elinks

link=$"" && elinks -dump  $link | sed -n '/separator/,/Subscribe to/p' | sed -r 's/^(.{49}).*/\1/' | sed '1d; $d'

or if printer is connected
link=$"" && lp <(elinks -dump  $link | sed -n '/separator/,/Subscribe to/p' | sed -r 's/^(.{49}).*/\1/' | sed '1d; $d')

or also for printing you can copy/paste text and (after installing xsel)
lp <(xsel -o)
or copy/paste in libreoffice and so on

Mentioning libreoffice I'll have to admit that libreoffice calc is really slow for openning/saving files, so I switched on gnumeric.