slartie

Submitted scripts and programs
Forum rules
Your own work only.
machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

slartie

Unread post by machinebacon » Thu Sep 05, 2013 12:53 pm

Very humble. Use like "./slartie 06" to grab the 6th issue, eg.
Defaults to less pager, if existing, else falls pack to $PAGER

Code: Select all

#!/bin/bash
if [ -f /usr/bin/less ]; then
    export PAGER=less
fi

if [ -z $1 ]; then
	echo "add a two-digit number, like 'slartie 03'"
fi

if [ ! -z $1 ]; then
	URL=http://slartie.com/
	ISS=issue_00$1
	TXT=slartie_com_issue_00$1
	ADR=$URL$ISS/$TXT.txt
	WGT="wget -q $ADR -O -"
	$WGT | $PAGER
fi
..gnutella..

User avatar
slartie
Grump
Posts: 416
Joined: Tue Jun 18, 2013 12:35 pm
Location: Denmark
Contact:

Re: slartie

Unread post by slartie » Thu Sep 05, 2013 6:53 pm

Nice!

Post Reply