Plan 9 from Bell Labs’s /usr/web/sources/contrib/fgb/rc/deb2tgz
#!/bin/rc rfork e if(~ $#* 0) { echo usage: deb2tgz file1 file2 ... >[1=2] exit usage } data=data.tar.gz for(f) { x=`{echo $f | sed 's/deb$/tgz/'} ar x $f $data mv $data $x }