I am piping the following output into this code: 
-rwx------ 1 reid staff 1734 Jun 22 14:52 prog
-rw------- 1 reid staff 21510 Apr 6 12:10 tmp.txt
-rwxr-xr-x 1 reid staff 8968 Feb 1 2013 xyz

it should use scanf to output: 
-rwx------1734 
-rw------- 21510 
-rwxr-xr-x 8968