summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 "$@" ;;
(*)