annotate bin/delquote @ 4155:1e4bcd213420
<oerjan> echo \'A catamorphism is when you recurse too greedily and too deep.\' >wisdom/catamorphism
author |
HackBot |
date |
Tue, 10 Dec 2013 17:18:55 +0000 |
parents |
7914d7e0b500 |
children |
03afb1619ef2 |
rev |
line source |
0
|
1 #!/bin/sh
|
|
2 id=$1
|
1906
|
3 expr "$1" + 0 >/dev/null 2>&1 || exit 1
|
0
|
4 head -n $((id-1)) quotes >quotes.new
|
|
5 tail -n +$((id+1)) quotes >>quotes.new
|
|
6 diff quotes quotes.new >/dev/null && exit 1
|
2114
|
7 printf "*poof*%s" "$(quote $id | cut -d')' -f2-)"
|
0
|
8 mv quotes.new quotes
|
|
9
|