Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Best way to search /prog/

Name: Anonymous 2008-09-05 16:55

Any one have any good scripts/ways to search /prog/?  I tried google but it sucks at finding /prog/ content.

Name: Anonymous 2008-09-06 3:05

>>17
that can be fixed pretty easily...
#!/bin/sh

if [ -z $1 ]
then
 echo "USAGE: $0 [regex]" 1>&2
 exit
fi

GET='basename \`which fetch curl wget lynx w3m links elinks | head -n1\``
case $GET in
 fetch)
  GET_OPTS="-qo-"
  ;;
 curl)
  GET_OPTS="-s"
  ;;
 wget)
  GET_OPTS="-qO-"
  ;;
 lynx)
 links)
 elinks)
  GET_OPTS="-source"
  ;;
 w3m)
  GET_OPTS="-dump_source"
  ;;
 *)
 echo "ERROR: could not find one of: fetch curl wget lynx w3m links elinks" 1>&2
 exit
 ;;
esac

if date --help 2>&1 >/dev/null
then
 DATECMD="date -d @" # assume gnu date if --help works
else
 DATECMD="date -r " # assume bsd date otherwise
fi

$GET $GET_OPTS http://dis.4chan.org/prog/subject.txt | sed '/'"$*"'/!d;s/^\(.*\)<>.*<>.*<>\(.*\)<>.*<>.*<>\(.*\)$/echo; echo Title: \1; echo URL: http:\/\/dis.4chan.org\/read\/prog\/\2; echo -n "Posted: "; $DATECMD\2; echo -n "Last Post: "; $DATECMD\3; echo/' | sh


and if your system's date utility doesn't work like the gnu or bsd one, you can just grab the source from http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/date/ and compile it.
and the rest of it is all POSIX.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List