Using -T and wanting fixed width view

Started by aab203, June 15, 2018, 09:56:17 AM

Previous topic - Next topic

aab203

Hi,

Might be a silly question and probably not Exiftool specific, but I was wondering if there is a way to use the -T command when outputing a number of items into the Terminal (macOS), but to have each printed column's minimum width to align to whatever is the widest string in that column... if that makes sense.

For example if I do exiftool -T -filename -fileModifyDate -createDate -dateTimeOriginal -creationDate .

I see

2017.08.19 - IMG_7116.MOV 2017:08:19 13:50:05+01:00 2017:08:19 19:51:09 - 2017:08:19 13:50:05+01:00
IMG_7118.JPG 2017:08:19 14:24:13+01:00 2017:08:19 14:24:13 2017:08:19 14:24:13 -
IMG_7119.JPG 2017:08:19 14:26:34+01:00 2017:08:19 14:26:34 2017:08:19 14:26:34 -
IMG_7127.JPG 2017:08:19 14:42:27+01:00 2017:08:19 14:42:27 2017:08:19 14:42:27 -
2017.08.19 - IMG_7124.MOV 2017:08:19 14:30:07+01:00 2017:08:19 20:05:30 - 2017:08:19 14:30:07+01:00
2017.08.19 - IMG_7125.MOV 2017:08:19 14:30:39+01:00 2017:08:19 13:30:39 - 2017:08:19 14:30:39+01:00


Ideally, to make it easier to read (especially when having different image types which have different default metadata tags filled out) i'd like all the column width to line up.

Thanks in advance  :D

StarGeek

Quote from: aab203 on June 15, 2018, 09:56:17 AM
Might be a silly question and probably not Exiftool specific, but I was wondering if there is a way to use the -T command when outputing a number of items into the Terminal (macOS), but to have each printed column's minimum width to align to whatever is the widest string in that column... if that makes sense.

I'd say that you're either going to have to create your own output string with the -p option or pipe the output through another command line program such as awk.  Looking around on the net, there also appears to be a unix command called Columns which would do what you want, but I'm not sure if there's a Mac port.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

aab203

Thank you - I'll take a look at your suggestions :)