plan9port/bin/B
rsc dbd7b9a97e various shell script fixes.
add 9a, 9c, 9l wrapper scripts.
label sets label on xterm/9term
2003-11-23 18:29:08 +00:00

27 lines
318 B
Bash
Executable file

#!/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
for i
do
pwd=`pwd`
file=`cleanname -d $pwd $i`
echo "B $file" >>$sam
done
fi