Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/rc/fetch

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


#!/bin/rc
# fetch - a better down (cf. rsc)

fn usage {
	echo >[1=2] usage: fetch [aux/statusbar options] url
	exit usage
}

opts=()
while(~ $1 -*){
	opts=($opts $1)
	shift
}

if(! ~ $#* 1)
	usage

ofile=`{basename $1}
hget -v -o $ofile $1 |[2] aux/statusbar $opts $ofile &
exit ''

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.