1#!/bin/rc 2# dircp src dest - copy a tree with tar 3switch($#*){ 4case 2 5 # explicitly mention /fd/* to work with both plan 9 and ape tar 6 @{cd $1 && tar cf /fd/1 .} | @{cd $2 && tar xTf /fd/0} 7case * 8 echo usage: dircp from to >[1=2] 9} 10