File:  [Plan 9 NeXT] / lucent / sys / src / 9 / port / f002549
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 18:01:03 2018 UTC (8 years, 1 month ago) by root
Branches: lucent, MAIN
CVS tags: plan9, HEAD
Plan 9 NeXT

#!/bin/rc

if(! ~ $#* 1){
	echo usage: mkdevlist file >[2=1]
	exit 1
}

fn mkextract{
	
	sed '/^$/d; /^#/d' $2 | awk '
	BEGIN { doprint=0 }
	doprint && /^[^	]/	{ doprint=0 }
	doprint			{ print "dev" $1 "'.$O'"; for(i=3; i <= NF; i++)
								print $i "'.$O'"; }
	$0 ~ field		{ doprint=1; next }
	' 'field=^'$1
}

mkextract dev $1

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.