diff options
author | tv <tv@iiso> | 2011-09-24 23:02:04 +0200 |
---|---|---|
committer | tv <tv@iiso> | 2011-09-24 23:02:04 +0200 |
commit | 4a9e5a72485cf09c44816985bb8090eac89e8523 (patch) | |
tree | 56b3ffaabf82d7a7212045a1d10dfa38eb062536 | |
parent | 52ca584dcd00236a6fe605121cc1b2f0f580e692 (diff) |
//util magic: implement retrieve
-rwxr-xr-x | util/bin/magic | 6 |
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 "$@" ;; (*) |