#!/bin/ksh

#https://old.reddit.com/r/openbsd/comments/1el0s9z/transmissiongtk_closes_without_error/
#gopher://gopherddit.com/1/cgi-bin/reddit.cgi?view&1el0s9z&openbsd&10

#usage: goperdit "https://reddit url"

id=$(print $1 | cut -d"/" -f7)
sub=$(print $1 | cut -d"/" -f5)

print "gopher://gopherddit.com/1/cgi-bin/reddit.cgi?view&view$id&$sub"

