plan9/sys/lib/samsave

15 lines
156 B
Plaintext
Raw Permalink Normal View History

2014-02-08 11:19:48 +04:00
#!/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
}