Plan 9 from Bell Labs’s /usr/web/sources/patch/applied/getflags-script-changes/ar89

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


#!/bin/rc
flagfmt='c,d,p,r,t,u,v,x'
argv0=ar89
args='archive files ...'

bifs=$ifs
ifs=''
if(! eval `{aux/getflags $*}) {
	aux/usage
	exit usage
}
ifs=$bifs

key=''
if (~ $#flagc 1) key=$key^c
if (~ $#flagd 1) key=$key^d
if (~ $#flagp 1) key=$key^p
if (~ $#flagr 1) key=$key^r
if (~ $#flagt 1) key=$key^t
if (~ $#flagx 1) key=$key^x
if (~ $#flagu 1) key=$key^u
if (~ $#flagv 1) key=$key^v
exec /$cputype/bin/ar $key $*

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.