View Single Post
Old 12-17-2012, 08:29 PM   PM User | #1
begood321
New Coder

 
Join Date: Sep 2012
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
begood321 is an unknown quantity at this point
Unhappy printf left alignment string format issue

Hi Guys,

I have an issue here. My code in printf is not formatting string left alignment for last column properly. See attachment for output.

Code:
printf MYFILE ("%-8s %13.0f %-38s\n", $original_line, $result, $user_folders);
$original_line prints 1st 3 columns as 1 string.

Command printf prints last column close to previous column left justified (but with inadequate spacing). I think this is the format I need. However, changing number in printf for last column to get better alignment under folder access heading doesn't increase spacing until column jumps to next line abruptly.

Thanks for any help you can provide.
Attached Files
File Type: txt printf issue.txt (548 Bytes, 54 views)
begood321 is offline   Reply With Quote