more help with formatting ls output...

Ok, for a fun project, my goal is to replicate the style of "catalog" on an old apple ][+...

If you're unfamiliar with the format, it was like this:

*A 002 SOMEAPPLESOFTFILE
  B 004 SOMEFILE
  T 006 SOMETEXT
  I  002 SOMEINTEGERFILE

The first character is either " " or "*" depending on if the file is locked or not.

Next is the filetype, so in my unix version, that could either be the mimetype abbreviated or-- the extension of the file if it has one.

And then is the file size..

Lastly the file name.

Can anyone walk me through some techniques to do this?

-patrick

Rewrite the ls code to your needs or use awk to reformat the output. In Unix/Linux there is usually no marking of locked files by listing them afaik.