Mercurial > repo
changeset 752:cb4e90411d82
<fizzie> run sed -ie 's/echo "\*poof\*/printf "*poof*%s" "/' bin/delquote
author | HackBot |
---|---|
date | Thu, 04 Oct 2012 21:26:27 +0000 |
parents | 2403e396852e |
children | a7ae96816b60 |
files | bin/delquote bin/delquotee |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/delquote Thu Oct 04 21:26:16 2012 +0000 +++ b/bin/delquote Thu Oct 04 21:26:27 2012 +0000 @@ -4,6 +4,6 @@ head -n $((id-1)) quotes >quotes.new tail -n +$((id+1)) quotes >>quotes.new diff quotes quotes.new >/dev/null && exit 1 -echo "*poof*$(quote $id | cut -d')' -f2-)" +printf "*poof*%s" "$(quote $id | cut -d')' -f2-)" mv quotes.new quotes
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/delquotee Thu Oct 04 21:26:27 2012 +0000 @@ -0,0 +1,9 @@ +#!/bin/sh +id=$1 +expr "$1" + 0 >/dev/null 2>&1 || exit 1 +head -n $((id-1)) quotes >quotes.new +tail -n +$((id+1)) quotes >>quotes.new +diff quotes quotes.new >/dev/null && exit 1 +echo "*poof*$(quote $id | cut -d')' -f2-)" +mv quotes.new quotes +