plan9fox/sys/lib/samsave
mischief 46cc1c444b sam: mark samsave executable
sam generates $home/sam.save for modified files. it expects /sys/lib/samsave to be executable to restore the modified files.
2014-06-25 03:13:52 -07:00

15 lines
156 B
Bash
Executable file

#!/bin/rc
file=$1
switch($#*){
case 1
echo -n $file'?'
yn=`{read < /dev/cons}
if(~ $yn y){
cat > $file
}
case 2
/bin/echo $file
/bin/cat > $file
}