Screen Output to Specific Columns

User with moderate experience:

I run a script (my addiction is KSH) that reads a file and reports certain parameters back to the user on screen and also piped to a file. The file(s) I read is/are located under different directories, and is usually called the same thing. Sometimes not. For example:

a/b/c/casefile
this/too/is/casefile_here

When I report (print out) the different parameters back, I also am reporting the location the file is in... but this can make for a disjointed output that might look something like this:

a; b; c; casefile - 1 digit, 3 digits, 9 acme bombs
this; too; is; casefile_here - 3 digit, 9 digits, 1 acme bomb

I would like to be able to have the printout look more like this:

a; b; c; casefile -_________1 digit, 3 digits, 9 acme bombs
this; too; is; casefile_here -
3 digit, 9 digits, 1 acme bomb

(SANS the "_'s"! I had to add those to line up the right section. doh!)

This is for ease of review of the column data in the right section.

I've tried various tab ideas but the length of the first (left) section of output dictates where the tabbing starts and does not line up my text in the right section in a nice, symmetrical pattern.

I'm not catching what it is I need to do, nor have I hit upon the right search term here on UNIX.COM to find what I'm looking for. (As the last hour or so can attest to.)

Any links or ideas would be welcomed that would help resolve my perplexity. "Thank you kindly!"

-Bruce

man printf

so I'll be able to print specific variables at specific columns with printf? Like putting the "digit" output at column 40 from the left? That would be cool. I thought I tried printf last week, but I'll take a 2nd gander. Thanks.

Thanks bud... by your pointing this out forced me to review the function a lot more carefully than I originally did and I got it working.

Appreciate it!