aboutsummaryrefslogtreecommitdiff
path: root/basic.sh
diff options
context:
space:
mode:
Diffstat (limited to 'basic.sh')
-rw-r--r--basic.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/basic.sh b/basic.sh
index 77d893b..891d9c5 100644
--- a/basic.sh
+++ b/basic.sh
@@ -47,6 +47,20 @@ function init
tmp_="$tmp_d/b"
}
+# $1: file to treat as input: filename
+# requires: init to be run
+function input
+{
+ cp "$1" "$tmp"
+}
+
+# $1: file to write to: filename
+# requires: init and input to be run
+function write
+{
+ cp "$tmp" "$1"
+}
+
function cleanup
{
rm -rf "$tmp_d"