File size distribution: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: made the output more consistant looking, added whitespace to the output, used a more idiomatic programming style..)
m (→‎{{header|REXX}}: made some cosmetic changes for statement alignment.)
Line 421:
parse var fID fn '.' /* " just the pure filename of pgm.*/
sw=max(79, linesize() - 1) /* " terminal width (linesize) - 1.*/
dirOut work= fn".OUT" /*filename for workfile output of DIR.*/
'DIR' ds '/s /-c /a-d >' dirOut work /*do (DOS) DIR cmd for a data structure*/
call linein 0, 1 /*open output file, point to 1st record*/
maxL=0; @.=00; g=0 /*max len size; log array; # good recs.*/
$=0 /*$: total bytes used by files found. */
do while lines(dirOutwork) \== 0; _=linein(work) /*process the data. in the DIR work file*/
_=linein(dirOUT); if left(_, 1)==' ' then iterate /*Is the record /*Notnot legitlegitimate? Skip. */
parse upper var _ . . sz . /*uppercase suffix*/
if \datatype(sz,'W') then do; #=left(sz, length(sz) - 1) /*SZ has a suffix?*/