From 4a9e5a72485cf09c44816985bb8090eac89e8523 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 24 Sep 2011 23:02:04 +0200 Subject: //util magic: implement retrieve --- util/bin/magic | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/bin/magic b/util/bin/magic index 874a8883..d3e86120 100755 --- a/util/bin/magic +++ b/util/bin/magic @@ -21,8 +21,9 @@ $es EOF } -#retrieve() { -#} +retrieve() { + sed -n "/^$bs$/,/^$es$/p" $3 | sed '1d;$d' +} update() { ! has "$@" || create "$@" @@ -37,6 +38,7 @@ destroy() { case $2 in (create) create "$@" ;; + (retrieve) retrieve "$@" ;; (update) update "$@" ;; (destroy) destroy "$@" ;; (*) -- cgit v1.2.3