Plan 9 from Bell Labs’s /usr/web/sources/contrib/rsc/scripts/tar

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc

tar=/$objtype/bin/tar

if(~ $1 *z*) {
	a=$1
	shift
	a=`{echo $a | tr -d z}
	file=()
	if(~ $a *f) {
		a=`{echo $a | tr -d f}
		file=$1
		shift
	}
	if(~ $a c*) {
		if(~ $#file 0)
			$tar $a $* | gzip -9
		if not
			$tar $a $* | gzip -9 >$file
	}
	if not {
		cat $file | gunzip | $tar $a $*
	}
}
if not
	$tar $*

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.