Re: procfs problems

Alan Modra (alan@spri.levels.unisa.edu.au)
Fri, 18 Apr 1997 08:43:27 +0930 (CST)


Dan Hollis wrote:
> On Thu, 17 Apr 1997, H. Peter Anvin wrote:
> > > What if you want multiple "fields" per line, and the "fields" contain
> > > spaces. What then?
> > Then you're better off using a printable separator, or using fixed
> > columns and *no* tabs (so you can use fixed offsets.)
>
> Fixed offsets blow chunks. When you need to expand field sizes it's a big
> headache.

This whole argument about procfs is a bit silly, but how about
printing a suitable format string for scanf as the first line.

For example, proc/interrupts

%d:%ld%*c%c%s
0: 11889254 timer
1: 29622 keyboard
2: 0 cascade
4: 6167 + serial
etc.