aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/B33
-rwxr-xr-xbin/samsave18
2 files changed, 51 insertions, 0 deletions
diff --git a/bin/B b/bin/B
new file mode 100755
index 00000000..c1a4b163
--- /dev/null
+++ b/bin/B
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+if [ $# -eq 0 ]
+then
+ echo 'usage: B cmd...' 2>&1
+ exit 1
+fi
+
+if [ "x$DISPLAY" = "x" ]
+then
+ sam="/tmp/.sam.$USER"
+else
+ sam="/tmp/.sam.$USER.$DISPLAY"
+fi
+
+if [ ! -p $sam ]
+then
+ echo could not find sam 2>&1
+ exit 2
+else
+ pwd=`pwd`
+ for i
+ do
+ case $i in
+ /*)
+ echo "B $i" >>$sam
+ ;;
+ *)
+ echo "B $pwd/$i" >>$sam
+ ;;
+ esac
+ done
+fi
diff --git a/bin/samsave b/bin/samsave
new file mode 100755
index 00000000..7d3a0fb0
--- /dev/null
+++ b/bin/samsave
@@ -0,0 +1,18 @@
+#!/bin/sh
+# Copyright (c) 1998 Lucent Technologies - All rights reserved.
+
+file=$1
+case "$2" in
+-f)
+ echo "$file"
+ cat >$file
+ ;;
+"")
+ echo "$file?"
+ read yn </dev/tty
+ case "$yn" in
+ [Yy]*)
+ cat >$file
+ esac
+esac
+