view bin/quote @ 2740:3b2a1b3e3621

<elliott> sed -i \'1036s/>/> /\' quotes
author HackBot
date Thu, 18 Apr 2013 00:38:38 +0000
parents 44d4b2e5140d
children
line wrap: on
line source

#!/bin/sh
allquotes | if [ "$1" ]; then
    if expr "$1" + 0 >/dev/null 2>&1; then
        sed "$1q;d"
    else
        grep -P -i -- "$1"
    fi
else shuf -n 1; fi