Makefile: add pickrand
[cmccabe-bin] / carat.sh
1 #!/bin/sh
2
3 #
4 # This is a simple little program for formatting text.
5 # When I'm posting messages to messageboards like LWN.net, I often like to
6 # quote another poster. The traditional way to do this is to put carats
7 # before his text, like this:
8 #
9 # > quoted text goes here
10 # reply goes here 
11 #
12 # This script will add the carats to source text. It will also do
13 # line-wrapping at 76 characters along the way.
14 #
15 # Colin McCabe
16 #
17
18 if [[ "$1" == "-w" ]]; then
19     fold -s -w 75 | sed 's/^/ > /'
20 else
21     sed 's/^/ > /'
22 fi