summaryrefslogtreecommitdiffstats
path: root/util/bin
diff options
context:
space:
mode:
authortv <tv@iiso>2011-09-24 23:02:04 +0200
committertv <tv@iiso>2011-09-24 23:02:04 +0200
commit4a9e5a72485cf09c44816985bb8090eac89e8523 (patch)
tree56b3ffaabf82d7a7212045a1d10dfa38eb062536 /util/bin
parent52ca584dcd00236a6fe605121cc1b2f0f580e692 (diff)
//util magic: implement retrieve
Diffstat (limited to 'util/bin')
-rwxr-xr-xutil/bin/magic6
1 files 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 "$@" ;;
(*)