Plan 9 from Bell Labs’s /n/sources/patch/sorry/tard/tard

Copyright © 2009 Alcatel-Lucent.
Distributed under the Lucent Public License version 1.02.
Download the Plan 9 distribution.


#!/bin/rc

opts=$1;shift
f=$1;shift

switch ($f) {
case (~ $f  '(\.tar\.gz|\.tgz)$')
	c='gzip'
	uc='gunzip'
case (~ $f  '(\.tar\.bz|\.tbz|\.tar\.bz2|\.tbz2)$')
	c='bzip2'
	uc='bunzip2'
case (~ $f  '(\.tar\.Z|\.tz)$')
	c='compress'
	uc='uncompress'
}

if(~ $opts 'x')
	cat $f | $uc | tar $opts 
if not {
	tar $opts $* | $c > $f
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2009 Alcatel-Lucent. All Rights Reserved.
Comments to webmaster@plan9.bell-labs.com.