File:  [Research Unix] / researchv10dc / cmd / oasd++ / dlist
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 3 months ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

#!/usr/bin/awk -f
function list(arr, alen,	newf, newarr, i, j) {
	for (i = 0; i < alen; i++) {
		newf = path arr[i]
		if ((getline < newf) <= 0)
			print arr[i]
		else {
			j = 0;
			do {
				newarr[j++] = $0;
			} while ((getline < newf) > 0)
			close(newf)
			list(newarr, j)
		}
	}
}
BEGIN {
	path = "/usr/lib/asd/dest/"
	if (ARGC <= 1) {
		boot[0] = "default";
		len = 1;
	} else {
		for (i = 1; i < ARGC; i++)
			boot[i-1] = ARGV[i];
		len = ARGC - 1;
	}
	list(boot, len)
	exit
}

unix.superglobalmegacorp.com

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