if (sys.argv.len() < 2) {
	println("usage: wc.az file [file..]")
	sys.exit(0)
}
fileNames = path.glob([sys.argv[1..]]):list
lenMax = fileNames:*len().max()
nlinesSum = 0
for (fileName in fileNames) {
	nlines = open(fileName).readlines().len()
	printf("%-*s %d\n", lenMax, fileName, nlines)
	nlinesSum += nlines
}
printf("%d\n", nlinesSum)
